Re: [dev] [PATCH] [lsw] Ensure buf[] is always null-terminated after strncpy()

2014-12-22 Thread Anselm R Garbe
On 1 December 2014 at 21:19, Dimitris Papastamos wrote: > On Mon, Dec 01, 2014 at 08:09:40PM +, Dimitris Papastamos wrote: >> if(!XmbTextPropertyToTextList(dpy, &prop, &list, &n) && n > 0) { >> strncpy(buf, list[0], sizeof buf); >> XFreeStringList(list); >> -

Re: [dev] [PATCH] [lsw] Ensure buf[] is always null-terminated after strncpy()

2014-12-01 Thread Dimitris Papastamos
On Mon, Dec 01, 2014 at 08:09:40PM +, Dimitris Papastamos wrote: > if(!XmbTextPropertyToTextList(dpy, &prop, &list, &n) && n > 0) { > strncpy(buf, list[0], sizeof buf); > XFreeStringList(list); > - } > - else > + } else > strncpy(buf,

[dev] [PATCH] [lsw] Ensure buf[] is always null-terminated after strncpy()

2014-12-01 Thread Dimitris Papastamos
>From 67b2c9c29b7eb9535645c07f65d3a885b801345c Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 1 Dec 2014 20:08:02 + Subject: [PATCH] Ensure buf[] is always null-terminated after strncpy() Small style fix as well. --- lsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git