#120 closed bug (fixed)
dstLen is not set with utf8_conversions.cpp
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | - General | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
src/kits/textencoding/utf8_conversions.cpp
*dstLen is not set when there are errors in convert_to_utf8() and convert_from_utf8().
It is necessary to set dstLen to 0 if there is no output.
sample if (*srcLen == 0) {
dst[0] = '\0'; *dstLen = 0; return B_OK;
}
Attachments (1)
Change History (6)
comment:1 by , 19 years ago
Resolution: | → fixed |
---|
comment:2 by , 19 years ago
Status: | new → closed |
---|
comment:3 by , 19 years ago
comment:4 by , 19 years ago
comment:5 by , 19 years ago
I think axeld checks on Dano and reproduced the behavior. Having a zero length doesn't sound as an error in the end.
Note:
See TracTickets
for help on using tickets.
I tested the behavior on R5 and fixed ours in rev 16294.