Message ID | 4A01758D.5060309@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Index: linux-2.6.29.2/fs/cifs/misc.c =================================================================== --- linux-2.6.29.2.orig/fs/cifs/misc.c +++ linux-2.6.29.2/fs/cifs/misc.c @@ -691,14 +691,15 @@ cifs_convertUCSpath(char *target, const NLS_MAX_CHARSET_SIZE); if (len > 0) { j += len; - continue; + goto overrun_chk; } else { target[j] = '?'; } } j++; /* make sure we do not overrun callers allocated temp buffer */ - if (j >= (2 * NAME_MAX)) +overrun_chk: + if (j >= UNICODE_NAME_MAX) break; } cUCS_out: