device-mapper ./WHATS_NEW dmeventd/dmeventd.c ...
CVSROOT: /cvs/dm
Module name: device-mapper
Changes by: [email protected] 2007-01-15 22:05:51
Modified files:
. : WHATS_NEW dmeventd : dmeventd.c dmsetup : dmsetup.c
Log message:
Fix a malloc error path in dmsetup message.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/WHATS_NEW.diff?cvsroot=dm&r1=1.147&r2=1.148
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmeventd/dmeventd.c.diff?cvsroot=dm&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmsetup/dmsetup.c.diff?cvsroot=dm&r1=1.74&r2=1.75
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 1.02.15 - =================================== + Fix a malloc error path in dmsetup message. More libdevmapper-event interface changes and fixes. Rename dm_saprintf() to dm_asprintf(). Report error if NULL pointer is supplied to dm_strdup_aux().
dmeventd/dmeventd.c +0 -11
@@ -29,22 +29,11 @@#include <dlfcn.h> #include <errno.h> -#include <fcntl.h> -#include <libgen.h> #include <pthread.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/file.h> -#include <sys/mman.h> -#include <sys/types.h> -#include <sys/stat.h> #include <sys/wait.h> -#include <sys/resource.h> #include <unistd.h> -#include <stdarg.h> #include <arpa/inet.h> /* for htonl, ntohl */ #ifdef linux
dmsetup/dmsetup.c +5 -1
@@ -533,7 +533,11 @@for (i =0 ; i < argc; i++) sz +=strlen (argv[i]) +1 ; - str =dm_malloc (sz); +if (!(str =dm_malloc (sz))) { +err ("message string allocation failed" ); + goto out; + } +memset (str,0 , sz);for (i =0 ; i < argc; i++) {