forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd1fcc62
committed
Fix incorrect buffer-length argument to uloc_getDisplayName().
The maxResultSize argument of uloc_getDisplayName is the number ofUChars in the output buffer, not the number of bytes. In principlethis could result in a stack smash, although at least in my Fedora 25install there are no ICU locales with display names long enough tooverrun the buffer. But it's easily proven to be wrong by reducingthe length of displayname to around 20, whereupon a stack smashdoes happen.(This is a rather scary bug, because the same mistake could easilyhave been made in other places; but in a quick code search lookingat uses of UChar I could not find any other instances.)1 parent08859bb commitd1fcc62
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
446 |
| - | |
| 446 | + | |
447 | 447 |
| |
448 | 448 |
| |
449 | 449 |
| |
|
0 commit comments
Comments
(0)