Skip to content

Commit c3b26eb

Browse files
committed
still ensure we assert for negative manufacturer data
1 parent 592ba9e commit c3b26eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/jsvar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,6 +4741,7 @@ JsVar *jsvNewArrayBufferWithPtr(unsigned int length, char **ptr) {
47414741

47424742
JsVar *jsvNewArrayBufferWithData(JsVarInt length, unsigned char *data) {
47434743
assert(data);
4744+
assert(length>=0);
47444745
if (length<0) return 0;
47454746
JsVar *dst = 0;
47464747
JsVar *arr = jsvNewArrayBufferWithPtr((unsigned int)length, (char**)&dst);

0 commit comments

Comments
 (0)