Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
0fa4baea
Commit
0fa4baea
authored
Oct 21, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using memcpy() in bstrcpy() confused FlexeLint, use strcpy() instead.
parent
e9a460f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
vdef.h
include/vdef.h
+2
-3
No files found.
include/vdef.h
View file @
0fa4baea
...
@@ -59,9 +59,8 @@
...
@@ -59,9 +59,8 @@
/* Safe strcpy into a fixed-size buffer */
/* Safe strcpy into a fixed-size buffer */
#define bstrcpy(dst, src) \
#define bstrcpy(dst, src) \
do { \
do { \
size_t lbstrcpy = strlen(src) + 1; \
assert(strlen(src) + 1 <= sizeof (dst)); \
assert(lbstrcpy <= sizeof dst); \
strcpy((dst), (src)); \
memcpy(dst, src, lbstrcpy); \
} while (0)
} while (0)
// TODO #define strcpy BANNED
// TODO #define strcpy BANNED
...
...
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