[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FDclone-users:00245] Re: SEGV caused by group lookups
- Subject: [FDclone-users:00245] Re: SEGV caused by group lookups
- From: "Akinori MUSHA" <knu@iDaemons.org>
- Date: Thu, 20 Nov 2003 14:14:35 +0900
At Wed, 19 Nov 2003 12:58:11 +0900,
Takashi SHIRAI wrote:
> getgrgid() の返した static value である gr_mem を複製しな
> いでそのまま保持しているので、getgrgid() を何度か繰返すこと
> で元の値が失われてしまっているんでしょうね。
> getgrgid() の実装にもよりますが、static value ではなく動的
> に malloc() で確保していた場合、free() した領域に access し
> てしまうことになりますね。
>
> 以下の patch でどうでしょう?
直りました。ありがとうございます。
duplvar() なんて便利なのがあったんですね。
--
/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp
"It seems to me as we make our own few circles 'round the sun
We get it backwards and our seven years go by like one"