Re: CryptoContext: uninitialized value
Tristan Matthews <[email protected]> Mon, 30 Apr 2012 14:50:59 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.ccrtp.devel |
|---|---|
| Message-ID | <557852251.293336.1335811859228.JavaMail.root@mail.savoirfairelinux.com> |
------=_Part_293334_1131205841.1335811859227 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ----- Original Message ----- > From: "Werner Dittmann" <[email protected]> > To: [email protected] > Sent: Monday, April 30, 2012 3:11:37 AM > Subject: Re: [Ccrtp-devel] CryptoContext: uninitialized value > > Initialization to NULL is correct. In case of non-authentication mode > this could > lead to problems if macCtx contains some random value and delete uses > this value > to free the macCtx. In that case, could the attached patch be applied? Best, Tristan > > This problem did not show up because SRTP usually uses an > authentication mode and > macCtx was initialized eventually. Note: SRTP shall always use an > authentication. > > Regards, > Werner > > Am 30.04.2012 03:45, schrieb Tristan Matthews: > > [Apologies for cross-posting...accidentally mailed this to > > bug-commoncpp] > > > > I was just wondering if macCtx in CryptoCtx is deliberately _not_ > > initialized in either of CryptoContext's constructors. > > I ask because this value is used in an if-statement in the > > destructor for CryptoContext (see CryptoContext.cpp:180). > > Note that the body of the if-statement checks against initialized > > values before doing any work, so the current code is harmless. > > > > Best, > > Tristan > > > > > _______________________________________________ > Ccrtp-devel mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/ccrtp-devel > ------=_Part_293334_1131205841.1335811859227 Content-Type: text/x-patch; name=crypto_context.patch Content-Disposition: attachment; filename=crypto_context.patch Content-Transfer-Encoding: base64 RnJvbSA2ZGRmMjg1MTAxZWU1MmMxM2UyYzVkNTUxYTdmZmU5NzA5YTkzN2JmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUcmlzdGFuIE1hdHRoZXdzIDx0cmlzdGFuLm1hdHRoZXdzQHNh dm9pcmZhaXJlbGludXguY29tPgpEYXRlOiBGcmksIDI3IEFwciAyMDEyIDE1OjI1OjM0IC0wNDAw ClN1Ym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91c2VfbmIoMCksIG1hc3Rlcl9rZXlfc3J0Y3BfdXNlX25iKDApLCBzZXFOdW1TZXQoZmFs c2UpLAotY2lwaGVyKE5VTEwpLCBmOENpcGhlcihOVUxMKQorbWFjQ3R4KE5VTEwpLCBjaXBoZXIo TlVMTCksIGY4Q2lwaGVyKE5VTEwpCiB7CiAgICAgdGhpcy0+ZWFsZyA9IGVhbGc7CiAgICAgdGhp cy0+YWFsZyA9IGFhbGc7Ci0tIAoxLjcuNS40Cgo= ------=_Part_293334_1131205841.1335811859227 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ccrtp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/ccrtp-devel ------=_Part_293334_1131205841.1335811859227--