similar to: Patch to replace strndup with malloc/strncpy for the ini plugin

Displaying 20 results from an estimated 8000 matches similar to: "Patch to replace strndup with malloc/strncpy for the ini plugin"

2008 Feb 07
1
[ANNOUNCE] compiz-0.7.0
A new compiz release 0.7.0 is now available from: http://xorg.freedesktop.org/archive/individual/app/compiz-0.7.0.tar.gz which can be verified with: http://xorg.freedesktop.org/archive/individual/app/compiz-0.7.0.tar.gz.sha1 59b019b6cd627140f44006876ee2b0c3ab92f150 compiz-0.7.0.tar.gz
2011 Jun 10
0
[PATCH] strndup(): Fix possible null pointer dereference
Directly return NULL if malloc failed. Signed-off-by: maximilian attems <max at stro.at> --- usr/klibc/strndup.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/klibc/strndup.c b/usr/klibc/strndup.c index 8b5974a..65afd44 100644 --- a/usr/klibc/strndup.c +++ b/usr/klibc/strndup.c @@ -10,8 +10,10 @@ char *strndup(const char *s, size_t n) int l = n >
2010 Mar 25
0
[PATCH 1/3] btrfs-progs: Fix a compile fail by strndup in RHEL5 env
From: Zhao Lei <zhaolei@cn.fujitsu.com> When we compile btrfs-progs in RHEL5(with default gcc 4.1.2 and glibc-2.5-18), we can get following error: cc1: warnings being treated as errors btrfs-list.c: In function ''ino_resolve'': btrfs-list.c:511: warning: implicit declaration of function ''strndup'' btrfs-list.c:511: warning: incompatible implicit declaration
2011 Jun 24
4
[PATCH 0/2] Correct various strndup() problems
The current implementation of strndup() has some shortcomings that can lead to a fatal error. - If we pass a maximum string length larger than the copied length, we will corrupt some data beyond the end of the newly allocated buffer. - The maximum length does not prevent access to memory beyond the maximum length, which can lead to unexpectd errors with strings not terminated by 0.
2007 Mar 30
0
strndup.c bug ?
luoyi at test:~/src/klibc.orig/klibc-1.5/usr/klibc$ diff -u strndup.c strndup.c.new --- strndup.c 2007-03-04 09:52:10.000000000 +0800 +++ strndup.c.new 2007-03-29 18:26:29.000000000 +0800 @@ -10,8 +10,9 @@ int l = n > strlen(s) ? strlen(s) + 1 : n + 1; char *d = malloc(l); - if (d) + if (d) { memcpy(d, s, l); - d[n] =
2010 Jun 28
1
[PATCH] Btrgs-progs: Define _GNU_SOURCE for strndup
This fixes: btrfs-list.c: Dans la fonction «ino_resolve» : btrfs-list.c:511: attention : déclaration implicite de la fonction « «strndup» » btrfs-list.c:511: attention : incompatible implicit declaration of built-in function «strndup» make: *** [btrfs-list.o] Erreur 1 and: btrfs.c: Dans la fonction «split_command» : btrfs.c:168: attention : déclaration implicite de la fonction « «strndup» »
2008 Jan 31
2
[patch] fix crash in ini plugin
The ini plugin segfaults on startup. The following patch fixes it. Not sure why this hasn't been caught before - i guess not many people use the ini plugin. Please apply. randolph diff --git a/plugins/ini.c b/plugins/ini.c index d58f671..2d3c2dd 100644 --- a/plugins/ini.c +++ b/plugins/ini.c @@ -377,7 +377,7 @@ iniParseLine (char *line, char **optionName, char **optionValue) if
2004 Apr 14
2
[LLVMdev] Linking strncpy
On Wed, 14 Apr 2004, Reid Spencer wrote: > The only thing I can think of is that string.h is being #included and > has different signatures for memcpy and strncpy. Possibly "char" is not > signed on your machine (very unusual) or some of the parameters are > declared as "const". The problem is that the code generated by the C backend cannot include any system
2004 Apr 14
1
[LLVMdev] Linking strncpy
Hi, I'm working on a CS326 compiler project, and I'm having some problems using string functions. Some LLVM programs produced are either aborting or giving incorrect results; however, if I disassemble the LLVM bytecode and recompile with GCC, everything works fine. I encountered the following error when running lli with '-force-interpreter' option: "Tried to execute an
2014 Aug 11
2
[PATCH] p2v: check results of strndup and sscanf
--- p2v/ssh.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/p2v/ssh.c b/p2v/ssh.c index 1e9b05c..ff906df 100644 --- a/p2v/ssh.c +++ b/p2v/ssh.c @@ -505,7 +505,16 @@ open_data_connection (struct config *config, int *local_port, int *remote_port) }, ovector, ovecsize)) { case 100: /* Ephemeral port. */ port_str =
2004 Apr 14
0
[LLVMdev] Linking strncpy
The only thing I can think of is that string.h is being #included and has different signatures for memcpy and strncpy. Possibly "char" is not signed on your machine (very unusual) or some of the parameters are declared as "const". Reid. On Wed, 2004-04-14 at 18:19, Eric Zimmerman wrote: > Chris, > > I'm fine with using JIT, but I'm trying to understand this
2007 Apr 12
2
[PATCH] Make com32 printf obey width-restriction on %s
Hi, The following patch is against 3.36. It lets the width-modifier to the %s conversion specifier restrict the length of the formatted string as well as expand it. In addition, it adds the strnlen function, which only exists as a prototype today. -- Arne. --- syslinux-3.36/com32/lib/Makefile.orig 2007-02-10 21:47:07.000000000 +0100 +++ syslinux-3.36/com32/lib/Makefile 2007-04-12
2004 Apr 15
0
[LLVMdev] Linking strncpy
Eric Zimmerman wrote: > Chris, > > I'm fine with using JIT, but I'm trying to understand this problem: > 1. My LLVM program does not produce correct results > 2. Using llvm-dis, I disassemble the bytecode to C > 3. I recompile using GCC and the program _works correctly_. > > The only odd thing is when I recompile with GCC, I see these messages: > >
2003 Nov 24
1
[PATCH] library functions
Hi, Here are some new library functions for klibc. Some of them are required for udev, which currently has a klibc_fixups.c file that implements these functions. mh -- Martin Hicks Wild Open Source Inc. mort@wildopensource.com 613-266-2296 # This is a BitKeeper generated patch for the following project: # Project Name: The kernel C library # This patch format is intended
2004 Apr 14
5
[LLVMdev] Linking strncpy
Chris, I'm fine with using JIT, but I'm trying to understand this problem: 1. My LLVM program does not produce correct results 2. Using llvm-dis, I disassemble the bytecode to C 3. I recompile using GCC and the program _works correctly_. The only odd thing is when I recompile with GCC, I see these messages: pal3.c:195: warning: conflicting types for built-in function `strcmp'
2007 Apr 11
2
Patch for ini plugin
Hi, recently I took a look at ini to find a bug which made it crash at startup. While fixing the bug I realized I could do some improvements to the option reading code (espacally the action part). So I went on and here we are. This patch should make ini more robust, clean it up and fix also some more crashes I had here. Additionaly, I have a attached a second patch from Maniac which should fix
2007 Oct 01
4
[ANNOUNCE] compiz-0.6.0
A new compiz release 0.6.0 is now available from: http://xorg.freedesktop.org/archive/individual/app/compiz-0.6.0.tar.gz which can be verified with: http://xorg.freedesktop.org/archive/individual/app/compiz-0.6.0.tar.gz.sha1 c296f9ccf0e35c582760880a6f0ac4fd34ee1bbf compiz-0.6.0.tar.gz http://xorg.freedesktop.org/archive/individual/app/compiz-0.6.0.tar.gz.sha1.asc
2018 Jan 12
0
[PATCH] drm/nouveau/core/client: use strlcpy() instead of strncpy()
From: Xiongfeng Wang <xiongfeng.wang at linaro.org> gcc-8 reports drivers/gpu/drm/nouveau/nvif/client.c: In function 'nvif_client_init': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sure the dest string is nul-terminated. Signed-off-by: Xiongfeng Wang
2018 Jul 13
0
[PATCH 04/18] nouveau: change strncpy+truncation to strlcpy
Generated by scripts/coccinelle/misc/strncpy_truncation.cocci Signed-off-by: Dominique Martinet <asmadeus at codewreck.org> --- Please see https://marc.info/?l=linux-kernel&m=153144450722324&w=2 (the first patch of the serie) for the motivation behind this patch drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git
2007 Feb 22
3
Flat file backend (ini)
I have written an initial flat file configuration backend for Compiz. At the moment it is using FAM for monitoring of files (it can be compiled without monitoring support for now). It is working fine but there are a couple of problems. 1. It looks like I should use addFileWatch rather than directly accessing FAM, is this correct? I notice dbus uses addFileWatch rather than