]> Pileus Git - ~andy/linux/blobdiff - lib/vsprintf.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[~andy/linux] / lib / vsprintf.c
index 1d659d7bb0f8ed595156f9863f773c476fe68d23..c11205688fb4d4ff070409557b633cf05c2d7c07 100644 (file)
@@ -898,7 +898,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
        case 'U':
                return uuid_string(buf, end, ptr, spec, fmt);
        case 'V':
-               return buf + vsnprintf(buf, end - buf,
+               return buf + vsnprintf(buf, end > buf ? end - buf : 0,
                                       ((struct va_format *)ptr)->fmt,
                                       *(((struct va_format *)ptr)->va));
        case 'K':