Commit 0fa4baea authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Using memcpy() in bstrcpy() confused FlexeLint, use strcpy() instead.

parent e9a460f8
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment