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/InitRD - Add AxWin4
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
libc.c
diff --git
a/KernelLand/Kernel/libc.c
b/KernelLand/Kernel/libc.c
index
d42e524
..
fba3047
100644
(file)
--- a/
KernelLand/Kernel/libc.c
+++ b/
KernelLand/Kernel/libc.c
@@
-74,6
+74,7
@@
EXPORT(CheckMem);
// === CODE ===
// - Import userland stroi.c file
#define _LIB_H_
// === CODE ===
// - Import userland stroi.c file
#define _LIB_H_
+#define _SysDebug(f,v...) Log_Debug("libc", f ,## v)
#include "../../Usermode/Libraries/libc.so_src/strtoi.c"
int ParseInt(const char *string, int *Val)
#include "../../Usermode/Libraries/libc.so_src/strtoi.c"
int ParseInt(const char *string, int *Val)
@@
-391,13
+392,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