Trace more things. Add a CORS header for /mem so I can make an app to examine it. Fix a memory leak. Fix tf_realloc(NULL, 0).
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4187 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -312,6 +312,7 @@ static JSValue _util_sha1_digest(JSContext* context, JSValueConst this_val, int
|
||||
const char* value = JS_ToCStringLen(context, &length, argv[0]);
|
||||
unsigned char digest[SHA_DIGEST_LENGTH] = { 0 };
|
||||
SHA1((const unsigned char*)value, length, digest);
|
||||
JS_FreeCString(context, value);
|
||||
return JS_NewArrayBufferCopy(context, digest, sizeof(digest));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user