summaryrefslogtreecommitdiffstats
path: root/source/lib/charcnv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/charcnv.c')
-rw-r--r--source/lib/charcnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index 8d5fbc8118d..2341429b9af 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -872,9 +872,9 @@ size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags)
size_t src_len = strlen(src);
pstring tmpbuf;
- /* treat a pstring as "unlimited" length */
+ /* No longer allow a length of -1 */
if (dest_len == (size_t)-1)
- dest_len = sizeof(pstring);
+ smb_panic("push_ascii - dest_len == -1");
if (flags & STR_UPPER) {
pstrcpy(tmpbuf, src);