vsprintf: don't use 'restricted_pointer()' when not restricting
Changes
1 files changed · +2 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| lib/vsprintf.c | modified | +2 | −0 | View file |
lib/vsprintf.c
View filediff --git a/lib/vsprintf.c b/lib/vsprintf.c
index d960aea..01c3957 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1931,6 +1931,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
return buf;
}
case 'K':
+ if (!kptr_restrict)
+ break;
return restricted_pointer(buf, end, ptr, spec);
case 'N':
return netdev_bits(buf, end, ptr, fmt);