Displaying 20 results from an estimated 4000 matches similar to: "strndup.c bug ?"
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 >
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.
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
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» »
2007 Sep 19
0
Patch to replace strndup with malloc/strncpy for the ini plugin
Hi,
I am the maintainer for the compiz port on FreeBSD. We do not have
strndup, so this patch replaces one other instance of strndup.
thanks,
robert.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Replace-strndup-with-malloc-and-strncpy.-FreeBSD-do.patch
Type: application/mbox
Size: 1671 bytes
Desc: not available
Url :
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 =
2006 Nov 27
2
Abuot the Bug of Speex 1.2beta1
Dear Sir/Miss:
I'm very sorry to bother you,but I've found a bug
in the Speex,Version 1.2beta1,and also I've have some
questions.
I'm deeply impressed by the work you have done in
the coding and decoding of speech signal.But when
using speex,I encoutered a bug,that is when in 32K
mode,the window size is still 200 samples,but not 400
samples,the bug will bring the problem of
2007 Jan 28
1
Problems with minicom on CentOS 4.4
Hi all
I am a newcomer of this ML. And I installed CentOS a
couple of hours ago on my i386 box because it is said
that CentOS is a community based binary distro of
RHEL. Before that I used to use RH9(it is quite out of
date for my newly upgraded PC) as my host environment
to work on embedded systems.
The installation procedure went smoothly and after
that everything looked functional, however, I
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
2011 Jul 27
0
klibc 1.5.24 release
Enough small fixes have pilled up to make it worth a release:
A Google patch adds sched_setaffinity, sched_getaffinity support.
Openembedded uses kexec_load(). Gentoo folks add a Kbuild fix.
ipconfig no longer wild guesses a nameserver when none is provided
by the DHCP server. strndup() and unlinkat() saw fixes for various
problems. codingstyle cleanup in kinit and tools.
git repository:
2020 Aug 26
2
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On 8/25/20 3:32 PM, Eric Blake wrote:
>>> - keys[optind] = strndup (argv[optind], n);
>>> - if (keys[optind] == NULL) {
>>> - perror ("strndup");
>>> + CLEANUP_FREE char *key = strndup (argv[optind], n);
>>> + const char *safekey = nbdkit_string_intern (key);
>>> + if (safekey == NULL)
>>>
2020 Aug 26
0
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On Wed, Aug 26, 2020 at 08:33:39AM -0500, Eric Blake wrote:
> On 8/25/20 3:32 PM, Eric Blake wrote:
>
> >>>- keys[optind] = strndup (argv[optind], n);
> >>>- if (keys[optind] == NULL) {
> >>>- perror ("strndup");
> >>>+ CLEANUP_FREE char *key = strndup (argv[optind], n);
> >>>+ const char
2020 Aug 25
0
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On 8/25/20 2:21 PM, Richard W.M. Jones wrote:
> On Tue, Aug 25, 2020 at 10:46:57AM -0500, Eric Blake wrote:
>> + const char *nbdkit_string_intern (const char *str);
>> +
>> +Returns a copy of str, so that the caller may reclaim str and use the
>> +copy in its place. If the copy is created outside the scope of a
>> +connection (such as during C<.load>), the
2020 Aug 18
1
Re: [PATCH nbdkit 3/9] server: Add general replacements for missing functions using LIBOBJS.
On 8/18/20 5:50 AM, Richard W.M. Jones wrote:
> Especially on Windows, some common functions are missing. Use the
> autoconf LIBOBJS mechanism to replace these functions.
>
> This includes replacement functions for:
>
> Function names Implementation Origin
>
> getdelim, getline general purpose NetBSD under a compatible license
>
> openlog,
2011 Sep 14
1
[nut-commits] svn commit r3226 - trunk/tools/nut-scanner
On Wed, 2011-09-14 at 12:25 +0000, Charles Lepple wrote:
> Author: clepple-guest
> Date: Wed Sep 14 12:25:03 2011
> New Revision: 3226
> URL: http://trac.networkupstools.org/projects/nut/changeset/3226
>
> Log:
> Include <string.h> for nut-scanner
>
> Modified:
> trunk/tools/nut-scanner/scan_snmp.c
> trunk/tools/nut-scanner/scan_usb.c
>
>
2020 Aug 25
3
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On Tue, Aug 25, 2020 at 10:46:57AM -0500, Eric Blake wrote:
> + const char *nbdkit_string_intern (const char *str);
> +
> +Returns a copy of str, so that the caller may reclaim str and use the
> +copy in its place. If the copy is created outside the scope of a
> +connection (such as during C<.load>), the lifetime of the copy will
> +last at least through C<.unload>;
2020 Aug 18
0
[PATCH nbdkit 3/9] server: Add general replacements for missing functions using LIBOBJS.
Especially on Windows, some common functions are missing. Use the
autoconf LIBOBJS mechanism to replace these functions.
This includes replacement functions for:
Function names Implementation Origin
getdelim, getline general purpose NetBSD under a compatible license
openlog, syslog, Win32 written by me
vsyslog
realpath Win32 written by me
2019 Sep 19
0
[nbdkit PATCH 4/4] server: Fix OPT_GO on different export than SET_META_CONTEXT
The NBD spec says that if a client requests SET_META_CONTEXT for
exportA, but later requests NBD_OPT_GO/EXPORT_NAME for exportB, then
the server should reject NBD_CMD_BLOCK_STATUS requests (that is, the
context returned for exportA need not apply to exportB). When we
originally added base:allocation, our argument was that we always
ignore export names, so it was easier to just treat any two
2020 Aug 20
0
[PATCH nbdkit 01/13] common/replacements: Replace missing functions using LIBOBJS.
Especially on Windows, some common functions are missing. Use the
autoconf LIBOBJS mechanism to replace these functions.
This includes replacement functions for:
Function names Implementation Origin
getdelim, getline general purpose NetBSD under a compatible license
openlog, syslog, Win32 written by me
vsyslog
realpath Win32 written by me
2020 Aug 06
0
[nbdkit PATCH v2 5/5] sh, eval: Add .list_exports support
Exposing .list_exports through to shell scripts makes testing export
listing a lot more feasible. The design chosen here is amenable to
'ls -1' or 'find' output provided there are no newlines in the files
being listed, while also being flexible enough to support a future
format addition if we find ourselves needing a way to express escape
sequences or parsing machine-readable code