Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit 34fcba1

Browse files
committed
Set byteLength to 0 if we return NULL
1 parent d60e17a commit 34fcba1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

JavaScriptCore/API/JSTypedArray.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ void * JSTypedArrayGetDataPtr(JSContextRef ctx, JSValueRef value, size_t * byteL
102102
return view->baseAddress();
103103
}
104104

105+
if( byteLength ) {
106+
*byteLength = 0;
107+
}
105108
return NULL;
106109
}
107110

0 commit comments

Comments
 (0)