History

Fix coverity issue: memory corruption due to overlapping copy.

Tor Andersson committed 7 years ago

Commit 69b312d1 parent 16049bb1 file · +2 −2Browse files

Unified · Split

jsvalue.c+2−2
@@ -592,12 +592,12 @@ retry: · 591 unmodified lines
592 592
593 if (x->type == JS_TBOOLEAN) {593 if (x->type == JS_TBOOLEAN) {
594 x->type = JS_TNUMBER;594 x->type = JS_TNUMBER;
595 x->u.number = x->u.boolean;595 x->u.number = x->u.boolean ? 1 : 0;
596 goto retry;596 goto retry;
597 }597 }
598 if (y->type == JS_TBOOLEAN) {598 if (y->type == JS_TBOOLEAN) {
599 y->type = JS_TNUMBER;599 y->type = JS_TNUMBER;
600 y->u.number = y->u.boolean;600 y->u.number = y->u.boolean ? 1 : 0;
601 goto retry;601 goto retry;
602 }602 }
603 if ((JSV_ISSTRING(x) || x->type == JS_TNUMBER) && y->type == JS_TOBJECT) {603 if ((JSV_ISSTRING(x) || x->type == JS_TNUMBER) && y->type == JS_TOBJECT) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t