Thread (3 messages) flat view 3 messages, 2 authors, 2017-09-26

Re: [PATCH] lib: fix multiple strlcpy definition

From: Phil Sutter <phil@nwl.cc>
Date: 2017-09-26 15:55:27

On Tue, Sep 26, 2017 at 02:08:49PM +0300, Baruch Siach wrote:
[...]
quoted hunk ↗ jump to hunk
diff --git a/configure b/configure
index 7be8fb113cc9..787b2e061af9 100755
--- a/configure
+++ b/configure
@@ -326,6 +326,27 @@ EOF
     rm -f $TMPDIR/dbtest.c $TMPDIR/dbtest
 }
 
+check_strlcpy()
+{
+    cat >$TMPDIR/strtest.c <<EOF
+#include <string.h>
+int main(int argc, char **argv) {
+	char dst[10];
+	strlcpy("test", dst, sizeof(dst));
You swapped source and destination here. It's not important for the
given use-case, but the resulting binary should segfault.

Apart from that, LGTM!

Cheers, Phil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help