Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
26898943
Commit
26898943
authored
Oct 21, 2009
by
Andreas Schwab
Browse files
(doprnt): Fix overflow check.
parent
528c56e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
src/ChangeLog
src/ChangeLog
+4
-0
src/doprnt.c
src/doprnt.c
+2
-2
No files found.
src/ChangeLog
View file @
26898943
2009-10-21 Andreas Schwab <schwab@linux-m68k.org>
* doprnt.c (doprnt): Fix overflow check.
2009-10-21 Jan Djärv <jan.h.d@swipnet.se>
* xterm.c (x_term_init): Remove XSynchronize call done for debugging.
...
...
src/doprnt.c
View file @
26898943
...
...
@@ -126,9 +126,9 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
unsigned
n
=
*
fmt
-
'0'
;
while
(
'0'
<=
fmt
[
1
]
&&
fmt
[
1
]
<=
'9'
)
{
if
(
n
*
10
/
10
!=
n
||
(
n
=
n
*
10
+
(
fmt
[
1
]
-
'0'
))
<
n
)
if
(
n
*
10
+
fmt
[
1
]
-
'0'
<
n
)
error
(
"Format width or precision too large"
);
n
=
n
*
10
+
fmt
[
1
]
-
'0'
;
*
string
++
=
*++
fmt
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment