"Lei Zhang" <thestig(a)google.com> wrote:
We'll skip doing strcmp() on a potentially uninitialized buffer if the returned length is wrong.
- todo_wine ok(!strcmp(useragent,buffer),"Got wrong user agent string %s instead of %s\n",buffer,useragent); - todo_wine ok(len == strlen(useragent),"Got wrong user agent length %d instead of %d\n",len,lstrlenA(useragent)); + len_ok = (len == strlen(useragent)); + todo_wine ok(len_ok,"Got wrong user agent length %d instead of %d\n",len,lstrlenA(useragent)); + if (len_ok) + todo_wine ok(!strcmp(useragent,buffer),"Got wrong user agent string %s instead of %s\n",buffer,useragent);
Probably a better solution would be to actually check the return value of InternetQueryOption before touching the returned buffers. -- Dmitry.