Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
649d8861
Commit
649d8861
authored
Jan 14, 2014
by
Philip Withnall
Committed by
Olivier Crête
Jan 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stun: Fix potential zero-length memset() call
GCC warns about this. Might as well prevent the warning.
parent
c796e9d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
stun/stunmessage.c
stun/stunmessage.c
+5
-3
No files found.
stun/stunmessage.c
View file @
649d8861
...
...
@@ -357,9 +357,11 @@ stun_message_append (StunMessage *msg, StunAttribute type, size_t length)
* to a multiple of 4 for compatibility with old RFC3489 */
a
=
stun_setw
(
a
,
stun_message_has_cookie
(
msg
)
?
length
:
stun_align
(
length
));
/* Add padding if needed */
memset
(
a
+
length
,
' '
,
stun_padding
(
length
));
mlen
+=
stun_padding
(
length
);
/* Add padding if needed. Avoid a zero-length memset() call. */
if
(
stun_padding
(
length
)
>
0
)
{
memset
(
a
+
length
,
' '
,
stun_padding
(
length
));
mlen
+=
stun_padding
(
length
);
}
}
mlen
+=
4
+
length
;
...
...
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