[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] test_memcpy() on Windows



"Nick Mathewson" <nickm@xxxxxxxxxxxx> wrote:

I assume this test works on Linux where AFAICS malloc() returns a buffer
with zeros. If so, shouldn't calloc() be used in 'setup_data_buffer()'
instead?

The test is broken: it doesn't work on any platform.  Look how buffer2
was copied directly from buffer1: they can't be unequal, on any
platform, no matter what malloc does.

Ok. I had some trouble expanding that macro in my head.

Fixed in tinytest; copied into Tor.

Fine.

--gv
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev