[Live-devel] use of unitialized memory in our_MD5End

PROMONET Michel michel.promonet at thalesgroup.com
Mon Jan 23 07:28:49 PST 2012


                Hi Ross,

Sorry but, I guess that valgrind has right due to padding bytes that are at the end of the structure.
seedData contains:
- timestamp  (so 2 long)
- counter (int)

In 64bits, it's not ok
- timeval is 2*8 bytes
- int is 4 bytes
and structure size is 24 bytes.
This 4 bytes of paddind are not initialized ut used in the md5.

In 32 bits it's ok :
- timeval is 2*4 bytes
- int is 4 bytes
ans structure size is 12 bytes, so no padding.

One way is to change counter from "int" to "long", but implicit thinks are usually hard to maintain....

Best Regards,

                Michel.

[@@THALES GROUP RESTRICTED@@]

De : live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] De la part de Ross Finlayson
Envoyé : vendredi 20 janvier 2012 15:18
À : LIVE555 Streaming Media - development & use
Objet : Re: [Live-devel] use of unitialized memory in our_MD5End

What do you think ?

I think that "valgrind" is incorrect in this case.  In the implementation of "Authenticator::setRealmAndRandomNonce()", both fields of the "seedData" structure are initialized.  (The "timestamp" field is initialized via the call to "gettimeofday()"; the "counter" field is set as well.)
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120123/38861093/attachment.html>


More information about the live-devel mailing list