> for(i = 0, dt = dynamic; i < nb_dts; i++, dt++) {
> ...
> name = dynstr + dt->d_un.d_val;
> + if ((Elf32_Dyn *)name > dynamic + (nb_dts * sizeof(Elf32_Dyn)))
> + break;
Hm, looks more like the strong sort of medicine....
Guess I would try this pill first:
http://lists.gnu.org/archive/html/tinycc-devel/2005-06/msg00026.html
--- grischka
Btw, upper array boundary is just: "pArray + nElements", also
compare of pointers into different memory regions is generally
not useful (pointer into dynstr > pointer into dynamic). Also the
end of the array is already outside, so, if at all, it would be >=,
not >
What you probably meant was:
for(i = 0, dt = dynamic; i < nb_dts; i++, dt++) {
+ if (dt >= dynamic + nb_dts)
+ break;
which of course is logically redundant, as long as 'i' wasn't changed
unexpectedly further down.
However, it probably happens more often than you might think, that bugs
are fixed by just some more bugs being added. As such, a bug in the right
place can make many users happy ;)
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel