libimg: img.decode now checks that length is not null
WebView: img tag: proceed data-src= if src= is empty, fix crash git-svn-id: svn://kolibrios.org@8363 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -720,6 +720,9 @@ proc img.decode _data, _length, _options ;//////////////////////////////////////
|
||||
;< eax = 0 / pointer to image ;;
|
||||
;;================================================================================================;;
|
||||
push ebx
|
||||
mov ebx, [_length]
|
||||
or ebx,ebx
|
||||
jz .fail
|
||||
mov ebx, img.formats_table
|
||||
@@: stdcall [ebx + FormatsTableEntry.Is], [_data], [_length]
|
||||
or eax, eax
|
||||
@@ -727,6 +730,8 @@ proc img.decode _data, _length, _options ;//////////////////////////////////////
|
||||
add ebx, sizeof.FormatsTableEntry
|
||||
cmp dword[ebx], eax ;0
|
||||
jnz @b
|
||||
.fail:
|
||||
xor eax, eax
|
||||
pop ebx
|
||||
ret
|
||||
@@: mov eax, [ebx + FormatsTableEntry.Decode]
|
||||
|
Reference in New Issue
Block a user