projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
8ba607c
f2acfa2
)
import from HEAD:
author
fcusack
<fcusack>
Thu, 9 Feb 2006 23:28:46 +0000
(23:28 +0000)
committer
fcusack
<fcusack>
Thu, 9 Feb 2006 23:28:46 +0000
(23:28 +0000)
otp_authenticate(): malloc raw_state before using it
1
2
src/modules/rlm_otp/otp_rlm.c
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
src/modules/rlm_otp/otp_rlm.c
index
81e57de
,
cc891b1
..
6e1a1d3
---
1
/
src/modules/rlm_otp/otp_rlm.c
---
2
/
src/modules/rlm_otp/otp_rlm.c
+++ b/
src/modules/rlm_otp/otp_rlm.c
@@@
-498,9
-498,11
+498,11
@@@
otp_authenticate(void *instance, REQUES
* Verify the state.
*/
- /* ASCII decode */
rad_state = rad_malloc(e_length + 1);
- (void) memcpy(rad_state, vp->vp_strvalue, vp->length);
+ raw_state = rad_malloc(e_length / 2);
+
+ /* ASCII decode */
+ (void) memcpy(rad_state, vp->strvalue, vp->length);
rad_state[e_length] = '\0';
(void) otp_keystring2keyblock(rad_state, raw_state);
free(rad_state);