Hi everyone,
A few days ago I was was writing some code to go over the data of
various sections. I know that sections marked SHT_NOBITS don't have
data, but I was expecting data = elf_getdata(scn, data) to return NULL.
Instead it return some value which, of course, proptly led to a seg
fault when I tried to dereference it. Of course, I can fix this by
avoiding elf_getdata() if(shdr.sh_type == SHT_NOBITS) but it would
probably be a good idea if elf_getdata returned NULL. I haven't had
time to jump into the source to see where this might be added, ie sorry
no patch.
--
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197