On 10/13/2014 06:47 PM, Alexander Graf wrote:
On 13.10.14 16:36, Chen Gang wrote:
strncat() will append additional '\0' to destination buffer, so need
additional 1 byte for it, or may cause memory overflow, just like other
area within QEMU have done.
Signed-off-by: Chen Gang
Am 24.10.2014 um 09:49 schrieb Michael Tokarev m...@tls.msk.ru:
On 10/13/2014 06:47 PM, Alexander Graf wrote:
On 13.10.14 16:36, Chen Gang wrote:
strncat() will append additional '\0' to destination buffer, so need
additional 1 byte for it, or may cause memory overflow, just like other
On 10/24/14 15:49, Michael Tokarev wrote:
On 10/13/2014 06:47 PM, Alexander Graf wrote:
On 13.10.14 16:36, Chen Gang wrote:
strncat() will append additional '\0' to destination buffer, so need
additional 1 byte for it, or may cause memory overflow, just like other
area within QEMU have done.
strncat() will append additional '\0' to destination buffer, so need
additional 1 byte for it, or may cause memory overflow, just like other
area within QEMU have done.
Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
target-ppc/kvm.c | 4 ++--
1 file changed, 2 insertions(+), 2
On 13.10.14 16:36, Chen Gang wrote:
strncat() will append additional '\0' to destination buffer, so need
additional 1 byte for it, or may cause memory overflow, just like other
area within QEMU have done.
Signed-off-by: Chen Gang gang.chen.5...@gmail.com
I agree with this patch. However,
On 10/13/14 22:47, Alexander Graf wrote:
Could you please instead rewrite it to use g_strdup_printf() rather than
strncat()s? That way we resolve all string pitfalls automatically - and
this code is not the fast path, so doing an extra memory allocation is ok.
I guess, it is a personal