Merge lp:~zorba-coders/zorba/bug-1158052-security into lp:zorba/security-module

Proposed by Paul J. Lucas
Status: Merged
Merged at revision: 29
Proposed branch: lp:~zorba-coders/zorba/bug-1158052-security
Merge into: lp:zorba/security-module
Diff against target: 90 lines (+32/-15)
2 files modified
src/hash.xq.src/hash.h (+16/-11)
src/hmac.xq.src/hmac.cpp (+16/-4)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1158052-security
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Paul J. Lucas Approve
Review via email: mp+170950@code.launchpad.net

Commit message

Corresponding changes for bug #1158052.

Description of the change

Corresponding changes for bug #1158052.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/hash.xq.src/hash.h'
2--- src/hash.xq.src/hash.h 2013-06-12 05:17:59 +0000
3+++ src/hash.xq.src/hash.h 2013-06-22 13:18:25 +0000
4@@ -132,24 +132,28 @@
5 lLen = lTmpDecodedBuf.size();
6 }
7 (*hash)(
8- reinterpret_cast<const unsigned char*>(lTmp),
9- lLen,
10- &lBuf[0]
11- );
12+ reinterpret_cast<const unsigned char*>(lTmp),
13+ lLen,
14+ &lBuf[0]
15+ );
16 }
17 else
18 {
19 String lTmp = aMessage.getStringValue();
20 (*hash)(
21- reinterpret_cast<const unsigned char*>(lTmp.data()),
22- lTmp.size(),
23- &lBuf[0]
24- );
25+ reinterpret_cast<const unsigned char*>(lTmp.data()),
26+ lTmp.size(),
27+ &lBuf[0]
28+ );
29 }
30 }
31- return
32- zorba::ItemSequence_t(new zorba::SingletonItemSequence(
33- getItemFactory()->createBase64Binary(&lBuf[0], DIGEST_LENGTH)));
34+ return zorba::ItemSequence_t(
35+ new zorba::SingletonItemSequence(
36+ getItemFactory()->createBase64Binary(
37+ reinterpret_cast<char const*>(&lBuf[0]), DIGEST_LENGTH, false
38+ )
39+ )
40+ );
41 }
42 };
43
44@@ -203,3 +207,4 @@
45 } /* namespace zorba */
46
47 #endif
48+/* vim:set et sw=2 ts=2: */
49
50=== modified file 'src/hmac.xq.src/hmac.cpp'
51--- src/hmac.xq.src/hmac.cpp 2013-06-12 05:17:59 +0000
52+++ src/hmac.xq.src/hmac.cpp 2013-06-22 13:18:25 +0000
53@@ -164,8 +164,13 @@
54 HMAC_Final(&ctx, out, &len);
55 HMAC_cleanup(&ctx);
56
57- return zorba::ItemSequence_t(new zorba::SingletonItemSequence(
58- theModule->getItemFactory()->createBase64Binary(&out[0], len)));
59+ return zorba::ItemSequence_t(
60+ new zorba::SingletonItemSequence(
61+ theModule->getItemFactory()->createBase64Binary(
62+ reinterpret_cast<char const*>(&out[0]), len, false
63+ )
64+ )
65+ );
66 }
67
68 zorba::ItemSequence_t
69@@ -227,8 +232,13 @@
70 HMAC_Final(&ctx, out, &len);
71 HMAC_cleanup(&ctx);
72
73- return zorba::ItemSequence_t(new zorba::SingletonItemSequence(
74- theModule->getItemFactory()->createBase64Binary(&out[0], len)));
75+ return zorba::ItemSequence_t(
76+ new zorba::SingletonItemSequence(
77+ theModule->getItemFactory()->createBase64Binary(
78+ reinterpret_cast<char const*>(&out[0]), len, false
79+ )
80+ )
81+ );
82 }
83
84 } /* namespace security */ } /* namespace zorba */
85@@ -242,3 +252,5 @@
86 extern "C" DLL_EXPORT zorba::ExternalModule* createModule() {
87 return new zorba::security::HMACModule();
88 }
89+
90+/* vim:set et sw=2 ts=2: */

Subscribers

People subscribed via source and target branches

to all changes: