On Monday 02 August 2004 08:44 am, Mike Frysinger wrote: > the gethostbyname_r() call itself is not segfaulting, but the memory > returned in the h_aliases array seems to be wrong ...
On Monday 02 August 2004 08:44 am, Mike Frysinger wrote:
> the gethostbyname_r() call itself is not segfaulting, but the memory
> returned in the h_aliases array seems to be wrong ...

was playing around with the source today and eventually the obvious answer hit
me ... while read_etc_hosts_r() generatings an array of strings fo h_aliases
and populates it, the dns path does not :)

find attached a patch that'll actually generate the h_aliases list in the
normal dns code path ... i used the etc_hosts_r() code as a template for some
of it ...

note that this is just a simple fix ... it fills the alias list with just the
hostname gethostbyname_r was passed ... the proper fix i think would be to
parse the dns packet down in __dns_lookup() and pass the info back via the
resolv_answer struct ...
but this fix is better than the current state of things ... that is, h_aliases
currently is never initailized in the dns code path :)

ddcc/klee-uclibc-0.9.33.2,mephi42/uClibc,waweber/uclibc-clang,wbx-github/uclibc-ng,groundwater/uClibc,ffainelli/uClibc,atgreen/uClibc-moxie,ffainelli/uClibc,atgreen/uClibc-moxie,m-labs/uclibc-lm32,hwoarang/uClibc,klee/klee-uclibc,atgreen/uClibc-moxie,hwoarang/uClibc,kraj/uClibc,waweber/uclibc-clang,ysat0/uClibc,atgreen/uClibc-moxie,hwoarang/uClibc,kraj/uClibc,czankel/xtensa-uclibc,czankel/xtensa-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uclibc-ng,majek/uclibc-vx32,brgl/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,m-labs/uclibc-lm32,OpenInkpot-archive/iplinux-uclibc,OpenInkpot-archive/iplinux-uclibc,ChickenRunjyd/klee-uclibc,mephi42/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,groundwater/uClibc,foss-xtensa/uClibc,hjl-tools/uClibc,kraj/uclibc-ng,ffainelli/uClibc,hwoarang/uClibc,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,ndmsystems/uClibc,ffainelli/uClibc,foss-xtensa/uClibc,ddcc/klee-uclibc-0.9.33.2,ysat0/uClibc,klee/klee-uclibc,wbx-github/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,waweber/uclibc-clang,skristiansson/uClibc-or1k,gittup/uClibc,gittup/uClibc,brgl/uclibc-ng,skristiansson/uClibc-or1k,kraj/uclibc-ng,ndmsystems/uClibc,brgl/uclibc-ng,foss-xtensa/uClibc,majek/uclibc-vx32,groundwater/uClibc,ddcc/klee-uclibc-0.9.33.2,ddcc/klee-uclibc-0.9.33.2,kraj/uclibc-ng,czankel/xtensa-uclibc,ndmsystems/uClibc,gittup/uClibc,ChickenRunjyd/klee-uclibc,czankel/xtensa-uclibc,hjl-tools/uClibc,mephi42/uClibc,ChickenRunjyd/klee-uclibc,m-labs/uclibc-lm32,ysat0/uClibc,wbx-github/uclibc-ng,ysat0/uClibc,ChickenRunjyd/klee-uclibc,m-labs/uclibc-lm32,gittup/uClibc,klee/klee-uclibc,hjl-tools/uClibc,ffainelli/uClibc,skristiansson/uClibc-or1k,waweber/uclibc-clang,klee/klee-uclibc,groundwater/uClibc,skristiansson/uClibc-or1k,kraj/uClibc,majek/uclibc-vx32,OpenInkpot-archive/iplinux-uclibc,brgl/uclibc-ng,groundwater/uClibc,wbx-github/uclibc-ng,mephi42/uClibc,ndmsystems/uClibc,majek/uclibc-vx32,hjl-tools/uClibc,foss-xtensa/uClibc