summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/nbtname.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/nbt/nbtname.c')
-rw-r--r--source4/libcli/nbt/nbtname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c
index da5205d818..adc66980c4 100644
--- a/source4/libcli/nbt/nbtname.c
+++ b/source4/libcli/nbt/nbtname.c
@@ -346,7 +346,7 @@ static const char *nbt_hex_encode(TALLOC_CTX *mem_ctx, const char *s)
if (isalnum(s[i]) || strchr(valid_chars, s[i])) {
ret[len++] = s[i];
} else {
- snprintf(&ret[len], 3, "%02x", s[i]);
+ snprintf(&ret[len], 4, "%%%02x", (unsigned char)s[i]);
len += 3;
}
}