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
Main
Synchronet
Commits
03e5f5cc
Commit
03e5f5cc
authored
May 13, 2013
by
deuce
Browse files
No, the well-named strlen variable does not include the NULL terminator
Mr. Smarty Pants.
parent
1bf13e1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/sbbs3/js_global.c
src/sbbs3/js_global.c
+1
-1
No files found.
src/sbbs3/js_global.c
View file @
03e5f5cc
...
...
@@ -2468,7 +2468,7 @@ js_internal_charfunc(JSContext *cx, uintN argc, jsval *arglist, char *(*func)(ch
if
(
str
==
NULL
)
return
(
JS_TRUE
);
if
(
extra_bytes
)
{
rastr
=
realloc
(
str
,
strlen
+
extra_bytes
);
rastr
=
realloc
(
str
,
strlen
+
extra_bytes
+
1
/* for terminator */
);
if
(
rastr
==
NULL
)
return
JS_TRUE
;
}
...
...
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