summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-18 20:03:15 +0000
committerJeremy Allison <jra@samba.org>2000-12-18 20:03:15 +0000
commite28f0a1f55fb8184f1edfb0bd8333f3d71e12225 (patch)
tree219298e1302752303984d8d3081e9a95fcf3ce78
parentb578b4da5d3170e57957fa3ddfb40c60d5935847 (diff)
downloadsamba-e28f0a1f55fb8184f1edfb0bd8333f3d71e12225.tar.gz
samba-e28f0a1f55fb8184f1edfb0bd8333f3d71e12225.tar.xz
samba-e28f0a1f55fb8184f1edfb0bd8333f3d71e12225.zip
A couple more UMR fixes.
Jeremy. (This used to be commit a83702c99f1ecd6e68f8c178b20823fce6d4c6c6)
-rw-r--r--source3/lib/util_unistr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 259b44e200..c989f589a5 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -176,7 +176,7 @@ char *dos_unistr2(uint16 *src)
nexti = (nexti+1)%8;
- for (p = lbuf; *src && (p-lbuf < MAXUNI-3); src++) {
+ for (p = lbuf; (p-lbuf < MAXUNI-3) && *src; src++) {
uint16 ucs2_val = SVAL(src,0);
uint16 cp_val = ucs2_to_doscp[ucs2_val];
@@ -205,7 +205,7 @@ char *dos_unistr2_to_str(UNISTR2 *str)
nexti = (nexti+1)%8;
- for (p = lbuf; *src && p-lbuf < max_size; src++) {
+ for (p = lbuf; (p-lbuf < max_size) && *src; src++) {
uint16 ucs2_val = SVAL(src,0);
uint16 cp_val = ucs2_to_doscp[ucs2_val];