Skip to content

Commit

Permalink
utf8.c: zero out cp variable in the len=0 case
Browse files Browse the repository at this point in the history
  • Loading branch information
rain-1 committed May 18, 2018
1 parent 4b3cc25 commit 1e6ffd4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ static size_t utf8BytesToCodePoint(const char* buf, size_t len, int* cp) {
}
}
}
*cp = 0;
return 0;
}

Expand Down

0 comments on commit 1e6ffd4

Please sign in to comment.