Bug Report: Client DOS in g10 keyserver search
Werner Koch
wk at gnupg.org
Thu Apr 26 13:34:06 CEST 2007
On Thu, 26 Apr 2007 13:15, simon at josefsson.org said:
>> Obviously the two variables have been reversed and the line should be
>> corrected to
>> ptr[plen]='\0';
>
> I thought those two statements were equivalent in C.
Exactly, all the following expressions are equivalent.
plen[ptr]
*(plen + ptr)
*(ptr + plen)
ptr[plen]
Maybe David did this as a test to see how long it would take that
someone stumbled on it and wondered about this geeky code: Close to 5
years. ;-)
Shalom-Salam,
Werner
More information about the Gnupg-devel
mailing list