X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Flibc.c;h=2e08a17c807993f3609089d65c83d22f4115fc2d;hb=9ae39ccdd3d650b307dee2726efd38dca3233854;hp=d42e5249e34289df90482f50b4094232e48274b7;hpb=ac32205b722276a0e7502e3ab003171f852341de;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/libc.c b/KernelLand/Kernel/libc.c index d42e5249..2e08a17c 100644 --- a/KernelLand/Kernel/libc.c +++ b/KernelLand/Kernel/libc.c @@ -391,13 +391,20 @@ int vsnprintf(char *__s, const size_t __maxlen, const char *__format, va_list ar case 'C': // Non-Null Terminated Character Array p = va_arg(args, char*); - if( !CheckMem(p, minSize) ) continue; // No #PFs please + if( !CheckMem(p, minSize) ) { + p = "(inval)"; + goto printString; + } if(!p) goto printString; while(minSize--) { if(*p == '\0') { PUTCH('\\'); PUTCH('0'); } + else if(*p == '\\') { + PUTCH('\\'); + PUTCH('\\'); + } else { PUTCH(*p); }