Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176365
b: refs/heads/master
c: 6c35663
h: refs/heads/master
i:
  176363: 4f3e4f5
v: v3
  • Loading branch information
André Goddard Rosa authored and Linus Torvalds committed Dec 15, 2009
1 parent 773b148 commit 564b187
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f4f81dce93774a447da3ceb98cce193ef84a3fa
refs/heads/master: 6c356634111c5a7a48264d7c9ec28559e4be11a2
9 changes: 5 additions & 4 deletions trunk/lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1496,13 +1496,14 @@ do { \
case FORMAT_TYPE_STR: {
const char *save_str = va_arg(args, char *);
size_t len;

if ((unsigned long)save_str > (unsigned long)-PAGE_SIZE
|| (unsigned long)save_str < PAGE_SIZE)
save_str = "(null)";
len = strlen(save_str);
if (str + len + 1 < end)
memcpy(str, save_str, len + 1);
str += len + 1;
len = strlen(save_str) + 1;
if (str + len < end)
memcpy(str, save_str, len);
str += len;
break;
}

Expand Down

0 comments on commit 564b187

Please sign in to comment.