diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-14 08:35:58 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-14 08:35:58 +0000 |
commit | ab4a3b36619f5dd7266834f25050302514d1ee90 (patch) | |
tree | 7ade56ecae11a814cb854d5b4e61840eab25288f /mdk-stage1 | |
parent | 33c1da0c00cf85e6a04e3bbbd8f862e4896751d1 (diff) | |
download | drakx-ab4a3b36619f5dd7266834f25050302514d1ee90.tar drakx-ab4a3b36619f5dd7266834f25050302514d1ee90.tar.gz drakx-ab4a3b36619f5dd7266834f25050302514d1ee90.tar.bz2 drakx-ab4a3b36619f5dd7266834f25050302514d1ee90.tar.xz drakx-ab4a3b36619f5dd7266834f25050302514d1ee90.zip |
Remove another potential buffer overflow
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/cdrom.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c index ef762a3c3..e951d35c3 100644 --- a/mdk-stage1/cdrom.c +++ b/mdk-stage1/cdrom.c @@ -38,8 +38,7 @@ static int mount_that_cd_device(char * dev_name) { char device_fullname[50]; - strcpy(device_fullname, "/dev/"); - strcat(device_fullname, dev_name); + snprintf(device_fullname, sizeof(device_fullname), "/dev/%s", dev_name); #ifdef MANDRAKE_MOVE return my_mount(device_fullname, IMAGE_LOCATION, "supermount", 0); |