Skip to content

Commit 7480434

Browse files
committed
Storable: protect store_other error buf
coverity warns about static buffer overflow.
1 parent 81c18b7 commit 7480434

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dist/Storable/Storable.xs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3960,7 +3960,8 @@ static int store_other(pTHX_ stcxt_t *cxt, SV *sv)
39603960
PTR2UV(sv), (char) 0);
39613961

39623962
len = strlen(buf);
3963-
STORE_SCALAR(buf, len);
3963+
if (len < 80)
3964+
STORE_SCALAR(buf, len);
39643965
TRACEME(("ok (dummy \"%s\", length = %" IVdf ")", buf, (IV) len));
39653966

39663967
return 0;

0 commit comments

Comments
 (0)