Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1980322

Browse files
author
Felipe Zimmerle
committed
Improvesowasp-modsecurity#927 by checking earlier if the string is empty or not
1 parent7ba07bd commit1980322

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎apache2/persist_dbm.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,10 @@ int collections_remove_stale(modsec_rec *msr, const char *col_name) {
626626
*/
627627
rc=apr_sdbm_firstkey(dbm,&key);
628628
while(rc==APR_SUCCESS) {
629-
char*s=apr_pstrmemdup(msr->mp,key.dptr,strlen(key.dptr));
630-
*(char**)apr_array_push(keys_arr)=s;
629+
if (key.dsize) {
630+
char*s=apr_pstrmemdup(msr->mp,key.dptr,key.dsize-1);
631+
*(char**)apr_array_push(keys_arr)=s;
632+
}
631633
rc=apr_sdbm_nextkey(dbm,&key);
632634
}
633635
apr_sdbm_unlock(dbm);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp