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
592592
593593 if (x->type == JS_TBOOLEAN) {
594594 x->type = JS_TNUMBER;
595− x->u.number = x->u.boolean;
595+ x->u.number = x->u.boolean ? 1 : 0;
596596 goto retry;
597597 }
598598 if (y->type == JS_TBOOLEAN) {
599599 y->type = JS_TNUMBER;
600− y->u.number = y->u.boolean;
600+ y->u.number = y->u.boolean ? 1 : 0;
601601 goto retry;
602602 }
603603 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