git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modules/FAT - Slight cleanup
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
libc.c
diff --git
a/KernelLand/Kernel/libc.c
b/KernelLand/Kernel/libc.c
index
d42e524
..
2e08a17
100644
(file)
--- 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*);
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');
}
if(!p) goto printString;
while(minSize--) {
if(*p == '\0') {
PUTCH('\\');
PUTCH('0');
}
+ else if(*p == '\\') {
+ PUTCH('\\');
+ PUTCH('\\');
+ }
else {
PUTCH(*p);
}
else {
PUTCH(*p);
}
UCC
git Repository :: git.ucc.asn.au