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-boun...@ns.live555.com 
[mailto:live-devel-boun...@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/

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to