forked frommicrosoft/ModSecurity
- Notifications
You must be signed in to change notification settings - Fork0
Commit1ed95ad
Fix invalid storage reference by apr_psprintf() when creating a string from salt[]. salt[] is not '\0'-terminated, so apr_psprintf() needs to be told the extent of the bytes to read.
It is easy to test old/new code standalone with valgrind;jst insert the getkey() function into this template:-----------getkey() goes here-----------------int main(void){ apr_pool_t *p; apr_initialize(); apr_pool_create(&p, NULL); printf("%s\n", getkey(p)); return 0;}1 parenta9a3925 commit1ed95ad
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
0 commit comments
Comments
(0)