Hit when using buildroot. I use MALLOC_CHECK_ and MALLOC_PERTURB_ in my
environment, so these kinds of things pop up every now and then :) .
Please keep me CC'd; I am not subscribed.
Thanks,
--Ben
Ben Boeckel (1):
confdata: fix invalid write
extra/config/confdata.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.6.1
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 71a37d8a7efe76b30ef04f540576040150628659 (commit)
via d5588ad18bbef13274437479de590d4ab37c7af6 (commit)
via 9f6d682c97a7e0a026f67f16064c749f51dc02b1 (commit)
from 34983ba9755185046484acafeedb8aae93de9951 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 71a37d8a7efe76b30ef04f540576040150628659
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:48:09 2015 +0200
alpha: add special umount2 handling
Only on Linux alpha __NR_oldumount is defined and a umount not
umount2 syscall, but with two parameter is used.
Add special handling for it and an alias for umount2() users.
There was a discussion about this special handling, but it seems
it was never committed upstream:
http://marc.info/?l=linux-alpha&m=137455037930738&w=2
Runtime tested with qemu-alpha and a statically linked busybox
binary.
commit d5588ad18bbef13274437479de590d4ab37c7af6
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:47:43 2015 +0200
alpha: fix kernel_stat struct
commit 9f6d682c97a7e0a026f67f16064c749f51dc02b1
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:47:13 2015 +0200
alpha: fix header name
-----------------------------------------------------------------------
Summary of changes:
libc/sysdeps/linux/alpha/__longjmp.S | 2 +-
libc/sysdeps/linux/alpha/bits/kernel_stat.h | 6 +++---
libc/sysdeps/linux/common/umount2.c | 7 ++++++-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/libc/sysdeps/linux/alpha/__longjmp.S b/libc/sysdeps/linux/alpha/__longjmp.S
index 5398856..35fd481 100644
--- a/libc/sysdeps/linux/alpha/__longjmp.S
+++ b/libc/sysdeps/linux/alpha/__longjmp.S
@@ -15,7 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <setjmp-offsets.h>
+#include <jmpbuf-offsets.h>
#define a0 $16
diff --git a/libc/sysdeps/linux/alpha/bits/kernel_stat.h b/libc/sysdeps/linux/alpha/bits/kernel_stat.h
index e919b21..32830fe 100644
--- a/libc/sysdeps/linux/alpha/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/alpha/bits/kernel_stat.h
@@ -13,9 +13,9 @@ struct kernel_stat {
unsigned int st_gid;
unsigned int st_rdev;
long int st_size;
- unsigned long st_atime;
- unsigned long st_mtime;
- unsigned long st_ctime;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
unsigned int st_blksize;
int st_blocks;
unsigned int st_flags;
diff --git a/libc/sysdeps/linux/common/umount2.c b/libc/sysdeps/linux/common/umount2.c
index 08e0f33..c86f3c8 100644
--- a/libc/sysdeps/linux/common/umount2.c
+++ b/libc/sysdeps/linux/common/umount2.c
@@ -10,7 +10,12 @@
#include <sys/syscall.h>
#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_umount2
-# include <sys/mount.h>
+#include <sys/mount.h>
_syscall2(int, umount2, const char *, special_file, int, flags)
libc_hidden_def(umount2)
#endif
+
+#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_oldumount
+_syscall2(int, umount, const char *, special_file, int, flags)
+strong_alias(umount,umount2)
+#endif
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 1303e7eb2b65f5275a57b66a7bebc8bfe1b32d4f (commit)
via a8336e957aee920c3da2e2bc049e5615936d3f11 (commit)
via f1c0fe7e8d6996e250418bf187b383418f238273 (commit)
via 3b02a1d5a372c8ba6e26691bfe8d7697705203ee (commit)
from 0074f6d29b2794ec9dbcb4a5e3c6e4defac220c2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1303e7eb2b65f5275a57b66a7bebc8bfe1b32d4f
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:48:09 2015 +0200
alpha: add special umount2 handling
Only on Linux alpha __NR_oldumount is defined and a umount not
umount2 syscall, but with two parameter is used.
Add special handling for it and an alias for umount2() users.
There was a discussion about this special handling, but it seems
it was never committed upstream:
http://marc.info/?l=linux-alpha&m=137455037930738&w=2
Runtime tested with qemu-alpha and a statically linked busybox
binary.
commit a8336e957aee920c3da2e2bc049e5615936d3f11
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:47:43 2015 +0200
alpha: fix kernel_stat struct
commit f1c0fe7e8d6996e250418bf187b383418f238273
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:47:13 2015 +0200
alpha: fix header name
commit 3b02a1d5a372c8ba6e26691bfe8d7697705203ee
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Oct 22 03:46:43 2015 +0200
alpha: enable in menu
-----------------------------------------------------------------------
Summary of changes:
extra/Configs/Config.in | 4 ++--
libc/sysdeps/linux/alpha/__longjmp.S | 2 +-
libc/sysdeps/linux/alpha/bits/kernel_stat.h | 6 +++---
libc/sysdeps/linux/common/umount2.c | 7 ++++++-
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 9737043..8e925b2 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -47,8 +47,8 @@ choice
help
The architecture of your target.
-#config TARGET_alpha
-# bool "alpha"
+config TARGET_alpha
+ bool "alpha"
config TARGET_arc
bool "arc"
diff --git a/libc/sysdeps/linux/alpha/__longjmp.S b/libc/sysdeps/linux/alpha/__longjmp.S
index 5398856..35fd481 100644
--- a/libc/sysdeps/linux/alpha/__longjmp.S
+++ b/libc/sysdeps/linux/alpha/__longjmp.S
@@ -15,7 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <setjmp-offsets.h>
+#include <jmpbuf-offsets.h>
#define a0 $16
diff --git a/libc/sysdeps/linux/alpha/bits/kernel_stat.h b/libc/sysdeps/linux/alpha/bits/kernel_stat.h
index e919b21..32830fe 100644
--- a/libc/sysdeps/linux/alpha/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/alpha/bits/kernel_stat.h
@@ -13,9 +13,9 @@ struct kernel_stat {
unsigned int st_gid;
unsigned int st_rdev;
long int st_size;
- unsigned long st_atime;
- unsigned long st_mtime;
- unsigned long st_ctime;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
unsigned int st_blksize;
int st_blocks;
unsigned int st_flags;
diff --git a/libc/sysdeps/linux/common/umount2.c b/libc/sysdeps/linux/common/umount2.c
index 08e0f33..c86f3c8 100644
--- a/libc/sysdeps/linux/common/umount2.c
+++ b/libc/sysdeps/linux/common/umount2.c
@@ -10,7 +10,12 @@
#include <sys/syscall.h>
#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_umount2
-# include <sys/mount.h>
+#include <sys/mount.h>
_syscall2(int, umount2, const char *, special_file, int, flags)
libc_hidden_def(umount2)
#endif
+
+#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_oldumount
+_syscall2(int, umount, const char *, special_file, int, flags)
+strong_alias(umount,umount2)
+#endif
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 34983ba9755185046484acafeedb8aae93de9951 (commit)
from 1a3b9cf039abc53825b3f65992cc22c36692dc02 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 34983ba9755185046484acafeedb8aae93de9951
Author: Ben Boeckel <mathstuf(a)gmail.com>
Date: Sat Oct 17 11:58:44 2015 -0400
confdata: fix invalid write
stndup will copy *up to* the size parameter, not allocate a buffer of
that size, so the buffer is not necessarily large enough to fit the
".old" extension.
Caught with glibc's MALLOC_CHECK_=3.
Signed-off-by: Ben Boeckel <mathstuf(a)gmail.com>
-----------------------------------------------------------------------
Summary of changes:
extra/config/confdata.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/extra/config/confdata.c b/extra/config/confdata.c
index 61c91c2..94c63c0 100644
--- a/extra/config/confdata.c
+++ b/extra/config/confdata.c
@@ -814,7 +814,8 @@ next:
fclose(out);
if (*tmpname) {
- dirname = strndup(basename, strlen(basename) + 4);
+ dirname = malloc(strlen(basename) + 4 + 1);
+ strcpy(dirname, basename);
strcat(dirname, ".old");
rename(newname, dirname);
free(dirname);
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 0074f6d29b2794ec9dbcb4a5e3c6e4defac220c2 (commit)
from 312f482d395b591398296b5472a3884a12716cbd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0074f6d29b2794ec9dbcb4a5e3c6e4defac220c2
Author: Ben Boeckel <mathstuf(a)gmail.com>
Date: Sat Oct 17 11:58:44 2015 -0400
confdata: fix invalid write
stndup will copy *up to* the size parameter, not allocate a buffer of
that size, so the buffer is not necessarily large enough to fit the
".old" extension.
Caught with glibc's MALLOC_CHECK_=3.
Signed-off-by: Ben Boeckel <mathstuf(a)gmail.com>
-----------------------------------------------------------------------
Summary of changes:
extra/config/confdata.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/extra/config/confdata.c b/extra/config/confdata.c
index 61c91c2..94c63c0 100644
--- a/extra/config/confdata.c
+++ b/extra/config/confdata.c
@@ -814,7 +814,8 @@ next:
fclose(out);
if (*tmpname) {
- dirname = strndup(basename, strlen(basename) + 4);
+ dirname = malloc(strlen(basename) + 4 + 1);
+ strcpy(dirname, basename);
strcat(dirname, ".old");
rename(newname, dirname);
free(dirname);
hooks/post-receive
--
uClibc-ng - small C library for embedded systems