diff -r mondo-2.2.1/src/common/libmondo-archive.c sandbox/mondo-2.2.1/src/common/libmondo-archive.c
399c399
< 		strcpy(tmp, last_line_of_file(MONDO_LOGFILE));
---
> 		strncpy(tmp, last_line_of_file(MONDO_LOGFILE),MAX_STR_LEN);
744c744
< 	strcpy(scratchdir, bkpinfo->scratchdir);
---
> 	strncpy(scratchdir, bkpinfo->scratchdir, MAX_STR_LEN);
748c748
< 	strcpy(devs_to_exclude, call_program_and_get_last_line_of_output(tmp));
---
> 	strncpy(devs_to_exclude, call_program_and_get_last_line_of_output(tmp), MAX_STR_LEN);
763c763
< 	strcpy(last_filelist_number, last_line_of_file(tmp));
---
> 	strncpy(last_filelist_number, last_line_of_file(tmp), MAX_STR_LEN);
766c766
< 		strcpy(tape_device, bkpinfo->media_device);
---
> 		strncpy(tape_device, bkpinfo->media_device, MAX_STR_LEN);
810,811c810,812
< 		strcpy(bootdev, call_program_and_get_last_line_of_output
< 			   ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'"));
---
> 		strncpy(bootdev, call_program_and_get_last_line_of_output
> 			("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'"),
> 			MAX_STR_LEN);
813,814c814,816
< 			strcpy(bootdev, call_program_and_get_last_line_of_output
< 				   ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'"));
---
> 			strncpy(bootdev, call_program_and_get_last_line_of_output
> 				("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'"),
> 				MAX_STR_LEN);
817,818c819,821
< 		strcpy(bootdev, call_program_and_get_last_line_of_output
< 			   ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"));
---
> 		strncpy(bootdev, call_program_and_get_last_line_of_output
> 			("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"),
> 			MAX_STR_LEN);
820,821c823,825
< 			strcpy(bootdev, call_program_and_get_last_line_of_output
< 				   ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1"));
---
> 		        strncpy(bootdev, call_program_and_get_last_line_of_output
> 			       ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1"),
> 				MAX_STR_LEN);
824,825c828,830
< 			strcpy(bootdev, call_program_and_get_last_line_of_output
< 				   ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"));
---
> 			strncpy(bootdev, call_program_and_get_last_line_of_output
> 				("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"),
> 				MAX_STR_LEN);
827,828c832,833
< 				strcpy(bootdev, call_program_and_get_last_line_of_output
< 					   ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | cut -dp -f1"));
---
> 				strncpy(bootdev, call_program_and_get_last_line_of_output
> 					   ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | cut -dp -f1"), MAX_STR_LEN);
848c853
< 			strcpy(bkpinfo->boot_device, bootdev);
---
> 		  strncpy(bkpinfo->boot_device, bootdev, MAX_STR_LEN / 4);
1078c1083
< 		strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 		strncpy(tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
1461c1466
< 	strcpy(tempfile,
---
> 	strncpy(tempfile,
1463c1468
< 		   ("mktemp -q /tmp/mondo.XXXXXXXX"));
---
> 		   ("mktemp -q /tmp/mondo.XXXXXXXX"), MAX_STR_LEN);
1731,1732c1736,1737
< 			strcpy(media_usage_comment,
< 				   percent_media_full_comment(bkpinfo));
---
> 			strncpy(media_usage_comment,
> 				   percent_media_full_comment(bkpinfo), MAX_STR_LEN);
2182c2187
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
2451c2456
< 		strcpy(media_usage_comment, percent_media_full_comment(bkpinfo));
---
> 		strncpy(media_usage_comment, percent_media_full_comment(bkpinfo), MAX_STR_LEN);
2707c2712
< 		strcpy(curr_file, cf);
---
> 		strncpy(curr_file, cf, MAX_STR_LEN);
2735c2740
< 		strcpy(curr_file, cf);
---
> 		strncpy(curr_file, cf, MAX_STR_LEN);
2817c2822
< 		strcpy(bootdisk_dev, DEFAULT_1722MB_DISK);
---
> 		strncpy(bootdisk_dev, DEFAULT_1722MB_DISK, MAX_STR_LEN);
2822c2827
< 		strcpy(bootdisk_dev, DEFAULT_1722MB_DISK);
---
> 		strncpy(bootdisk_dev, DEFAULT_1722MB_DISK, MAX_STR_LEN);
3029c3034
< 		strcpy(curr_file, cf);
---
> 		strncpy(curr_file, cf, MAX_STR_LEN);
3091c3096
< 	strcpy(bkp, cdrw_dev);
---
> 	strncpy(bkp, cdrw_dev, MAX_STR_LEN);
3093c3098
< 		strcpy(cdrw_dev, bkp);
---
> 		strncpy(cdrw_dev, bkp, MAX_STR_LEN);
3220,3221c3225,3227
< 			strcpy(our_serial_str,
< 				   call_program_and_get_last_line_of_output(tmp));
---
> 			strncpy(our_serial_str,
> 				call_program_and_get_last_line_of_output(tmp),
> 				MAX_STR_LEN);
3427c3433
< 		strcpy(suffix, bkpinfo->zip_suffix);
---
> 		strncpy(suffix, bkpinfo->zip_suffix, MAX_STR_LEN);
3445c3451
< 		strcpy (tmp, call_program_and_get_last_line_of_output(command));
---
> 		strncpy (tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
3464c3470
< 	strcpy(biggiestruct.filename, biggie_filename);
---
> 	strncpy(biggiestruct.filename, biggie_filename, MAX_STR_LEN);
3474c3480
< 	strcpy(tmp, slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, ""));
---
> 	strncpy(tmp, slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, ""), MAX_STR_LEN);
3505,3510c3511,3516
< 		strcpy(curr_slice_fname_uncompressed,
< 			   slice_fname(biggie_file_number, slice_num, bkpinfo->tmpdir,
< 						   ""));
< 		strcpy(curr_slice_fname_compressed,
< 			   slice_fname(biggie_file_number, slice_num, bkpinfo->tmpdir,
< 						   suffix));
---
> 		strncpy(curr_slice_fname_uncompressed,
> 			slice_fname(biggie_file_number, slice_num, bkpinfo->tmpdir,
> 				    ""), MAX_STR_LEN);
> 		strncpy(curr_slice_fname_compressed,
> 		       slice_fname(biggie_file_number, slice_num, bkpinfo->tmpdir,
> 				   suffix), MAX_STR_LEN);
3512c3518
< 		strcpy(tmp, percent_media_full_comment(bkpinfo));
---
> 		strncpy(tmp, percent_media_full_comment(bkpinfo), MAX_STR_LEN);
3583c3589
< 			strcpy(file_to_archive, curr_slice_fname_compressed);
---
> 			strncpy(file_to_archive, curr_slice_fname_compressed, MAX_STR_LEN);
3588c3594
< 			strcpy(file_to_archive, curr_slice_fname_uncompressed);
---
> 			strncpy(file_to_archive, curr_slice_fname_uncompressed, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-archive.c~
diff -r mondo-2.2.1/src/common/libmondo-devices.c sandbox/mondo-2.2.1/src/common/libmondo-devices.c
282,283c282,287
< 	strcpy(g_cdrom_drive_is_here, bkpinfo->media_device);	// just in case
< 	strcpy(g_dvd_drive_is_here, bkpinfo->media_device);	// just in case
---
> 	strncpy(g_cdrom_drive_is_here, 
> 		bkpinfo->media_device, 
> 		MAX_STR_LEN / 4);	// just in case
> 	strncpy(g_dvd_drive_is_here, 
> 		bkpinfo->media_device,
> 		MAX_STR_LEN / 4);	// just in case
328c332
< 	strcpy(tmp, where_is_root_mounted());
---
> 	strncpy(tmp, where_is_root_mounted(), MAX_STR_LEN);
680c684
< 		strcpy(dev, g_dvd_drive_is_here);
---
> 		strncpy(dev, g_dvd_drive_is_here, MAX_STR_LEN);
685c689
< 		strcpy(dev, g_cdrom_drive_is_here);
---
> 		strncpy(dev, g_cdrom_drive_is_here, MAX_STR_LEN);
742c746
< 		strcpy(cdrw_device, g_cdrw_drive_is_here);
---
> 		strncpy(cdrw_device, g_cdrw_drive_is_here, MAX_STR_LEN);
770c774,776
< 		strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 		strncpy(tmp, 
> 			call_program_and_get_last_line_of_output(command), 
> 			MAX_STR_LEN);
779c785
< 		strcpy(cdrw_device, tmp);
---
> 		strncpy(cdrw_device, tmp, MAX_STR_LEN);
782c788
< 		strcpy(g_cdrw_drive_is_here, cdrw_device);
---
> 		strncpy(g_cdrw_drive_is_here, cdrw_device, MAX_STR_LEN);
842c848
< 		strcpy(output, g_cdrom_drive_is_here);
---
> 		strncpy(output, g_cdrom_drive_is_here, MAX_STR_LEN);
848c854
< 		strcpy(output, the_last_place_i_found_it);
---
> 		strncpy(output, the_last_place_i_found_it, MAX_STR_LEN);
893c899
< 				strcpy(phrase_one, p);
---
> 				strncpy(phrase_one, p, MAX_STR_LEN);
902c908
< 						strcpy(phrase_two, p);
---
> 						strncpy(phrase_two, p, MAX_STR_LEN);
983c989
< 		strcpy(output, dvd_last_resort);
---
> 		strncpy(output, dvd_last_resort, MAX_STR_LEN);
1072,1073c1078,1079
< 		strcpy(the_last_place_i_found_it, output);
< 		strcpy(g_cdrom_drive_is_here, output);
---
> 		strncpy(the_last_place_i_found_it, output, MAX_STR_LEN);
> 		strncpy(g_cdrom_drive_is_here, output, MAX_STR_LEN);
1082c1088,1090
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, 
> 		call_program_and_get_last_line_of_output(command), 
> 		MAX_STR_LEN);
1084c1092
< 		strcpy(output, tmp);
---
> 		strncpy(output, tmp, MAX_STR_LEN);
1118c1126
< 		strcpy(output, g_dvd_drive_is_here);
---
> 		strncpy(output, g_dvd_drive_is_here, MAX_STR_LEN);
1137c1145
< 		strcpy(g_dvd_drive_is_here, output);
---
> 		strncpy(g_dvd_drive_is_here, output, MAX_STR_LEN);
1328c1336,1338
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, 
> 	       call_program_and_get_last_line_of_output(command), 
> 	       MAX_STR_LEN);
1354c1364,1366
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, 
> 	       call_program_and_get_last_line_of_output(command), 
> 	       MAX_STR_LEN);
1364c1376
< 		strcpy(tmp, p + 1);
---
> 		strncpy(tmp, p + 1, MAX_STR_LEN);
1506c1518
< 		strcpy(tmp, device_raw);
---
> 		strncpy(tmp, device_raw, MAX_STR_LEN);
1639c1651
< 		strcpy(dev, device);
---
> 		strncpy(dev, device, MAX_STR_LEN);
1644c1656
< 		strcpy(dev, make_vn(device));
---
> 		strncpy(dev, make_vn(device), MAX_STR_LEN);
1650c1662
< 		strcpy(device, dev);
---
> 		strncpy(device, dev, MAX_STR_LEN);
2135c2147
< 			strcpy(g_selfmounted_isodir, bkpinfo->isodir);
---
> 			strncpy(g_selfmounted_isodir, bkpinfo->isodir, MAX_STR_LEN);
2142c2154
< 		strcpy(tmp, bkpinfo->nfs_remote_dir);
---
> 		strncpy(tmp, bkpinfo->nfs_remote_dir, MAX_STR_LEN);
2149c2161
< 		strcpy(bkpinfo->nfs_remote_dir, tmp);
---
> 		strncpy(bkpinfo->nfs_remote_dir, tmp, MAX_STR_LEN);
2155c2167
< 			strcpy(tmp, bkpinfo->nfs_remote_dir);
---
> 			strncpy(tmp, bkpinfo->nfs_remote_dir, MAX_STR_LEN);
2164c2176
< 			strcpy(bkpinfo->nfs_remote_dir, tmp);
---
> 			strncpy(bkpinfo->nfs_remote_dir, tmp, MAX_STR_LEN);
2300c2312
< 		strcpy(tmp, list_of_NFS_mounts_only());
---
> 		strncpy(tmp, list_of_NFS_mounts_only(), MAX_STR_LEN);
2308,2310c2320,2323
< 		strcpy(tmp,
< 			   call_program_and_get_last_line_of_output
< 			   ("parted2fdisk -l | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'"));
---
> 		strncpy(tmp,
> 			call_program_and_get_last_line_of_output
> 			   ("parted2fdisk -l | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'"), 
> 			MAX_STR_LEN);
2419,2424c2432,2439
< 	strcpy(exclude_these_directories,
< 		   call_program_and_get_last_line_of_output
< 		   ("mount -t coda,ncpfs,nfs,smbfs,cifs,afs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"));
< 	strcpy(exclude_these_devices,
< 		   call_program_and_get_last_line_of_output
< 		   ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));
---
> 	strncpy(exclude_these_directories,
> 		call_program_and_get_last_line_of_output
> 		   ("mount -t coda,ncpfs,nfs,smbfs,cifs,afs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"), 
> 		MAX_STR_LEN);
> 	strncpy(exclude_these_devices,
> 		call_program_and_get_last_line_of_output
> 		   ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"), 
> 		MAX_STR_LEN);
2449,2454c2464,2471
< 	strcpy(exclude_these_directories,
< 		   call_program_and_get_last_line_of_output
< 		   ("mount -t coda,ncpfs,nfs,smbfs,cifs,afs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"));
< 	strcpy(exclude_these_devices,
< 		   call_program_and_get_last_line_of_output
< 		   ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));
---
> 	strncpy(exclude_these_directories,
> 		call_program_and_get_last_line_of_output
> 		   ("mount -t coda,ncpfs,nfs,smbfs,cifs,afs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"), 
> 		MAX_STR_LEN);
> 	strncpy(exclude_these_devices,
> 		call_program_and_get_last_line_of_output
> 		   ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"), 
> 		MAX_STR_LEN);
2511,2517c2528,2536
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs,afs,mvfs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
< #else
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs -x afs -x mvfs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output
> 		   ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs,afs,mvfs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"), 
> 		MAX_STR_LEN);
> #else
> 	strncpy(tmp,
> 	       call_program_and_get_last_line_of_output
> 		   ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs -x afs -x mvfs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"), 
> 	       MAX_STR_LEN);
2521c2540
< 		strcpy(sz, tmp);
---
> 		strncpy(sz, tmp, MAX_STR_LEN);
2617c2636,2638
< 		strcpy(mountdev, call_program_and_get_last_line_of_output(tmp));
---
> 		strncpy(mountdev, 
> 			call_program_and_get_last_line_of_output(tmp), 
> 			MAX_STR_LEN);
2627c2648
< 	strcpy(mountdev, bkpinfo->media_device);
---
> 	strncpy(mountdev, bkpinfo->media_device, MAX_STR_LEN);
2664,2668c2685,2693
< 	strcpy(tmp, call_program_and_get_last_line_of_output
< 		   ("mount | grep \" on / \" | cut -d' ' -f1"));
< #else
< 	strcpy(tmp, call_program_and_get_last_line_of_output
< 		   ("mount | grep \" on / \" | cut -d' ' -f1 | sed s/[0-9]// | sed s/[0-9]//"));
---
> 	strncpy(tmp, 
> 		call_program_and_get_last_line_of_output
> 		   ("mount | grep \" on / \" | cut -d' ' -f1"), 
> 		MAX_STR_LEN);
> #else
> 	strncpy(tmp, 
> 		call_program_and_get_last_line_of_output
> 		   ("mount | grep \" on / \" | cut -d' ' -f1 | sed s/[0-9]// | sed s/[0-9]//"), 
> 		MAX_STR_LEN);
2670,2671c2695,2697
< 		strcpy(tmp, call_program_and_get_last_line_of_output
< 			   ("mount | grep \" on / \" | cut -d' ' -f1 | cut -dp -f1"));
---
> 		strncpy(tmp, call_program_and_get_last_line_of_output
> 			   ("mount | grep \" on / \" | cut -d' ' -f1 | cut -dp -f1"),
> 			MAX_STR_LEN);
2674,2676c2700,2703
< 		strcpy(tmp,
< 			   call_program_and_get_last_line_of_output
< 			   ("mount | grep \" on / \" | cut -d' ' -f1"));
---
> 		strncpy(tmp,
> 			call_program_and_get_last_line_of_output
> 			   ("mount | grep \" on / \" | cut -d' ' -f1"), 
> 			MAX_STR_LEN);
2778c2805
< 			strcpy(which_device, current_drive);
---
> 			strncpy(which_device, current_drive, MAX_STR_LEN);
2783c2810
< 			strcpy(which_device, current_drive);
---
> 			strncpy(which_device, current_drive, MAX_STR_LEN);
2859c2886
< 		strcpy(output, incoming);
---
> 		strncpy(output, incoming, MAX_STR_LEN);
2861c2888
< 		strcpy(curr_fname, incoming);
---
> 		strncpy(curr_fname, incoming, MAX_STR_LEN);
2866c2893,2895
< 			strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 			strncpy(tmp, 
> 				call_program_and_get_last_line_of_output(command), 
> 				MAX_STR_LEN);
2870c2899
< 			strcpy(scratch, p);
---
> 			strncpy(scratch, p, MAX_STR_LEN);
2876c2905
< 				strcpy(curr_fname, scratch);	// copy whole thing because it's an absolute softlink
---
> 				strncpy(curr_fname, scratch, MAX_STR_LEN);	// copy whole thing because it's an absolute softlink
2885c2914
< 				strcpy(p, scratch);
---
> 				strncpy(p, scratch, MAX_STR_LEN);
2889c2918
< 		strcpy(output, curr_fname);
---
> 		strncpy(output, curr_fname, MAX_STR_LEN);
2920c2949
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-devices.c~
diff -r mondo-2.2.1/src/common/libmondo-fifo.c sandbox/mondo-2.2.1/src/common/libmondo-fifo.c
255c255,257
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, 
> 		call_program_and_get_last_line_of_output(command),
> 		MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-fifo.c~
diff -r mondo-2.2.1/src/common/libmondo-filelist.c sandbox/mondo-2.2.1/src/common/libmondo-filelist.c
233c233
< 		strcpy(dev, ptr);
---
> 		strncpy(dev, ptr, MAX_STR_LEN);
717c717
< 		strcpy(current_master_file, incoming + 8);
---
> 		strncpy(current_master_file, incoming + 8, MAX_STR_LEN);
878c878
< 		strcpy(original_string, string_to_add);
---
> 		strncpy(original_string, string_to_add, MAX_STR_LEN);
1032c1032
< 			strcpy(tmp, fname);
---
> 			strncpy(tmp, fname, MAX_STR_LEN);
1574c1574
< 			strcpy(new, dir);
---
> 			strncpy(new, dir, MAX_STR_LEN);
1580c1580
< 			strcpy(new_with_spaces + 1, new);
---
> 			strncpy(new_with_spaces + 1, new, MAX_STR_LEN - 1);
1650c1650
< 	strcpy(sz_res, incoming);
---
> 	strncpy(sz_res, incoming, MAX_STR_LEN);
1826c1826
< 		strcpy(original_string, string_to_find);
---
> 		strncpy(original_string, string_to_find, MAX_STR_LEN);
1904c1904
< 				strcpy(tmp, fname);
---
> 				strncpy(tmp, fname, MAX_STR_LEN);
1907c1907
< 				strcpy(tmp + 1, fname);
---
> 				strncpy(tmp + 1, fname, MAX_STR_LEN - 1);
1909c1909
< 			strcpy(fname, tmp);
---
> 			strncpy(fname, tmp, MAX_STR_LEN);
1928,1929c1928,1929
< 					strcpy(tmp, fname + 1);
< 					strcpy(fname, tmp);
---
> 					strncpy(tmp, fname + 1, MAX_STR_LEN);
> 					strncpy(fname, tmp, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-filelist.c~
diff -r mondo-2.2.1/src/common/libmondo-files.c sandbox/mondo-2.2.1/src/common/libmondo-files.c
354c354
< 		strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 		strncpy(tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
408c408,410
< 	strcpy(incoming, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(incoming,
> 		call_program_and_get_last_line_of_output(command), 
> 		MAX_STR_LEN);
419,420c421,423
< 		strcpy(incoming,
< 			   call_program_and_get_last_line_of_output(command));
---
> 		strncpy(incoming,
> 			call_program_and_get_last_line_of_output(command),
> 			MAX_STR_LEN);
425,426c428,430
< 		strcpy(incoming,
< 			   call_program_and_get_last_line_of_output(command));
---
> 		strncpy(incoming,
> 			call_program_and_get_last_line_of_output(command),
> 			MAX_STR_LEN);
428c432
< 	strcpy(output, incoming);
---
> 	strncpy(output, incoming, MAX_STR_LEN);
524,525c528,530
< 		strcpy(lastline,
< 			   call_program_and_get_last_line_of_output(command));
---
> 		strncpy(lastline,
> 			call_program_and_get_last_line_of_output(command),
> 			MAX_STR_LEN);
530c535
< 		strcpy(lastline, err_log_lines[i]);
---
> 		strncpy(lastline, err_log_lines[i], MAX_STR_LEN);
637,640c642,646
< 	char stub_fname[1000];
< 	char curr_fname[1000];
< 	char curr_cksum[1000];
< 	char tmp[1000];
---
> #define CHECKSUM_BUFFER_SIZE 1000 
> 	char stub_fname[CHECKSUM_BUFFER_SIZE];
> 	char curr_fname[CHECKSUM_BUFFER_SIZE];
> 	char curr_cksum[CHECKSUM_BUFFER_SIZE];
> 	char tmp[CHECKSUM_BUFFER_SIZE];
675,676c681,682
< 		strcpy(curr_fname, tmp + 1);
< 		strcpy(curr_cksum, calc_file_ugly_minichecksum(curr_fname));
---
> 		strncpy(curr_fname, tmp + 1, CHECKSUM_BUFFER_SIZE);
> 		strncpy(curr_cksum, calc_file_ugly_minichecksum(curr_fname), CHECKSUM_BUFFER_SIZE);
862c868
< 	strcpy(sz_res, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(sz_res, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
916c922
< 					strcpy (tmp, call_program_and_get_last_line_of_output(command));
---
> 					strncpy (tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
1181,1182c1187,1189
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output("which mondorestore"));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output("which mondorestore"),
> 		MAX_STR_LEN);
1238c1245
< 	strcpy(tmp, bkpinfo->nfs_mount);
---
> 	strncpy(tmp, bkpinfo->nfs_mount, MAX_STR_LEN);
1245,1246c1252,1253
< 	strcpy(nfs_server_ipaddr, tmp);
< 	strcpy(nfs_mount, p);
---
> 	strncpy(nfs_server_ipaddr, tmp, MAX_STR_LEN);
> 	strncpy(nfs_mount, p, MAX_STR_LEN);
1250c1257,1259
< 	strcpy(nfs_dev, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(nfs_dev,
> 		call_program_and_get_last_line_of_output(command), 
> 		MAX_STR_LEN);
1253,1254c1262,1264
< 	strcpy(nfs_client_ipaddr,
< 		   call_program_and_get_last_line_of_output(command));
---
> 	strncpy(nfs_client_ipaddr,
> 		call_program_and_get_last_line_of_output(command), 
> 		MAX_STR_LEN);
1257,1258c1267,1269
< 	strcpy(nfs_client_netmask,
< 		   call_program_and_get_last_line_of_output(command));
---
> 	strncpy(nfs_client_netmask,
> 	       call_program_and_get_last_line_of_output(command),
> 	       MAX_STR_LEN);
1261,1262c1272,1274
< 	strcpy(nfs_client_broadcast,
< 		   call_program_and_get_last_line_of_output(command));
---
> 	strncpy(nfs_client_broadcast,
> 	       call_program_and_get_last_line_of_output(command),
> 	       MAX_STR_LEN);
1265,1266c1277,1279
< 	strcpy(nfs_client_defgw,
< 		   call_program_and_get_last_line_of_output(command));
---
> 	strncpy(nfs_client_defgw,
> 	       call_program_and_get_last_line_of_output(command), 
> 	       MAX_STR_LEN);
1268,1269c1281,1282
< 			"nfs_client_ipaddr=%s; nfs_server_ipaddr=%s; nfs_mount=%s",
< 			nfs_client_ipaddr, nfs_server_ipaddr, nfs_mount);
---
> 		"nfs_client_ipaddr=%s; nfs_server_ipaddr=%s; nfs_mount=%s",
> 		nfs_client_ipaddr, nfs_server_ipaddr, nfs_mount);
1272c1285
< 			("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified.");
---
> 		  ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified.");
1288c1301,1303
< 		strcpy(mac_addr, call_program_and_get_last_line_of_output(command));
---
> 		strncpy(mac_addr, 
> 			call_program_and_get_last_line_of_output(command),
> 			MAX_STR_LEN);
1291c1306,1308
< 		strcpy(nfs_dev, call_program_and_get_last_line_of_output(command));
---
> 		strncpy(nfs_dev,
> 		       call_program_and_get_last_line_of_output(command),
> 		       MAX_STR_LEN);
1402c1419
< 		strcpy(outstr, p);
---
> 		strncpy(outstr, p, MAX_STR_LEN);
1424c1441
< 	strcpy(do_not_compress_these, last_line_of_file(tmp));
---
> 	strncpy(do_not_compress_these, last_line_of_file(tmp), MAX_STR_LEN);
1426c1443
< 		strcpy(tmp, p);
---
> 		strncpy(tmp, p, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-files.c~
diff -r mondo-2.2.1/src/common/libmondo-fork.c sandbox/mondo-2.2.1/src/common/libmondo-fork.c
149c149
< 				strcpy(result, tmp);
---
> 				strncpy(result, tmp, 512);
239c239
< 	strcpy(tmp, command);
---
> 	strncpy(tmp, command, 1200);
251c251
< 		strcpy(command, tmp);
---
> 		strncpy(command, tmp, 1200);
360c360
< 	strcpy(initial_label, tmp);
---
> 	strncpy(initial_label, tmp, MAX_STR_LEN * 2);
691,694c691,695
< 	strcpy(title, tt);
< 	strcpy(tempfile,
< 		   call_program_and_get_last_line_of_output
< 		   ("mktemp -q /tmp/mondo.XXXXXXXX"));
---
> 	strncpy(title, tt, MAX_STR_LEN);
> 	strncpy(tempfile,
> 		call_program_and_get_last_line_of_output
> 		   ("mktemp -q /tmp/mondo.XXXXXXXX"),
> 		MAX_STR_LEN);
782c783
< 	strcpy(title, tt);
---
> 	strncpy(title, tt, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-fork.c~
diff -r mondo-2.2.1/src/common/libmondo-mountlist.c sandbox/mondo-2.2.1/src/common/libmondo-mountlist.c
146c146,147
< 			strcpy(mountpoint, mountlist->el[pos].mountpoint);
---
> 			strncpy(mountpoint, 
> 				mountlist->el[pos].mountpoint, MAX_STR_LEN);
219c220
< 		strcpy(mountpoint, mountlist->el[pos].mountpoint);
---
> 		strncpy(mountpoint, mountlist->el[pos].mountpoint, MAX_STR_LEN);
298c299,301
< 				strcpy(mountpoint, mountlist->el[pos].mountpoint);
---
> 				strncpy(mountpoint, 
> 					mountlist->el[pos].mountpoint, 
> 					MAX_STR_LEN);
443c446,448
< 		strcpy(mountpoint, mountlist->el[pos].mountpoint);
---
> 		strncpy(mountpoint, 
> 			mountlist->el[pos].mountpoint, 
> 			MAX_STR_LEN);
675c680,682
< 		strcpy(curr_mountpoint, mountlist->el[currline].mountpoint);
---
> 		strncpy(curr_mountpoint, 
> 			mountlist->el[currline].mountpoint, 
> 			MAX_STR_LEN);
781c788
< 		strcpy(drive, mountlist->el[lino].device);
---
> 		strncpy(drive, mountlist->el[lino].device, MAX_STR_LEN);
821c828,830
< 			strcpy(drivelist->el[noof_drives++].device, drive);
---
> 			strncpy(drivelist->el[noof_drives++].device, 
> 				drive,
> 				MAX_STR_LEN);
1010c1019,1021
< 			strcpy(tmp, mountlist->el[items].device);
---
> 			strncpy(tmp, 
> 				mountlist->el[items].device, 
> 				MAX_STR_LEN);
1021c1032,1034
< 				strcpy(mountlist->el[items].device, tmp);
---
> 				strncpy(mountlist->el[items].device, 
> 					tmp, 
> 					MAX_STR_LEN);
1157,1159c1170,1172
< 	strcpy(device, mountlist->el[a].device);
< 	strcpy(mountpoint, mountlist->el[a].mountpoint);
< 	strcpy(format, mountlist->el[a].format);
---
> 	strncpy(device, mountlist->el[a].device, 64);
> 	strncpy(mountpoint, mountlist->el[a].mountpoint, 256);
> 	strncpy(format, mountlist->el[a].format, 64);
1163,1165c1176,1178
< 	strcpy(mountlist->el[a].device, mountlist->el[b].device);
< 	strcpy(mountlist->el[a].mountpoint, mountlist->el[b].mountpoint);
< 	strcpy(mountlist->el[a].format, mountlist->el[b].format);
---
> 	strncpy(mountlist->el[a].device, mountlist->el[b].device, 64);
> 	strncpy(mountlist->el[a].mountpoint, mountlist->el[b].mountpoint, 256);
> 	strncpy(mountlist->el[a].format, mountlist->el[b].format, 64);
1169,1171c1182,1184
< 	strcpy(mountlist->el[b].device, device);
< 	strcpy(mountlist->el[b].mountpoint, mountpoint);
< 	strcpy(mountlist->el[b].format, format);
---
> 	strncpy(mountlist->el[b].device, device, 64);
> 	strncpy(mountlist->el[b].mountpoint, mountpoint, 256);
> 	strncpy(mountlist->el[b].format, format, 64);
Only in sandbox/mondo-2.2.1/src/common: libmondo-mountlist.c~
diff -r mondo-2.2.1/src/common/libmondo-raid.c sandbox/mondo-2.2.1/src/common/libmondo-raid.c
232c232
< 	strcpy(raidrec->additional_vars.el[lino].value, sz_value);
---
> 	strncpy(raidrec->additional_vars.el[lino].value, sz_value, MAX_STR_LEN);
483c483
< 		strcpy(label, incoming);
---
> 		strncpy(label, incoming, MAX_STR_LEN);
538,541c538,541
< 				strcpy(raidlist->spares.el[raidlist->spares.entries].name,
< 					   drivename);
< 				strcpy(raidlist->spares.el[raidlist->spares.entries].
< 					   device, devname);
---
> 				strncpy(raidlist->spares.el[raidlist->spares.entries].name,
> 					drivename, 64);
> 				strncpy(raidlist->spares.el[raidlist->spares.entries].
> 					   device, devname, 64);
546,549c546,549
< 				strcpy(raidlist->disks.el[raidlist->disks.entries].name,
< 					   drivename);
< 				strcpy(raidlist->disks.el[raidlist->disks.entries].device,
< 					   devname);
---
> 				strncpy(raidlist->disks.el[raidlist->disks.entries].name,
> 					drivename, 64);
> 				strncpy(raidlist->disks.el[raidlist->disks.entries].device,
> 					devname, 64);
559c559,560
< 			strcpy(raidlist->el[raidlist->entries].volname, volname);
---
> 			strncpy(raidlist->el[raidlist->entries].volname, 
> 				volname, 64);
670,671c671,676
< 			strcpy(raidlist->el[items].additional_vars.el[v].label, label);
< 			strcpy(raidlist->el[items].additional_vars.el[v].value, value);
---
> 			strncpy(raidlist->el[items].additional_vars.el[v].label, 
> 				label,
> 				MAX_STR_LEN);
> 			strncpy(raidlist->el[items].additional_vars.el[v].value,
> 				value,
> 				MAX_STR_LEN);
682c687
< 		strcpy(raidlist->el[items].raid_device, value);
---
> 		strncpy(raidlist->el[items].raid_device, value, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-raid.c~
diff -r mondo-2.2.1/src/common/libmondo-stream.c sandbox/mondo-2.2.1/src/common/libmondo-stream.c
356c356,358
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output(command),
> 		MAX_STR_LEN);
366c368,370
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp,
> 	       call_program_and_get_last_line_of_output(command),
> 	       MAX_STR_LEN);
374c378,380
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, 
> 		call_program_and_get_last_line_of_output(command), 
> 		MAX_STR_LEN);
398c404
< 	strcpy(tmp, call_program_and_get_last_line_of_output("\
---
> 	strncpy(tmp, call_program_and_get_last_line_of_output("\
401c407,408
< awk '{for(i=1; i<NF; i++) { if (index($i, \"GB\")>0) { print $i;};};};'"));
---
> awk '{for(i=1; i<NF; i++) { if (index($i, \"GB\")>0) { print $i;};};};'"),
> 		MAX_STR_LEN);
407c414,416
< 		strcpy(tmp, (strrchr(dev, '/') != NULL) ? strrchr(dev, '/') : dev);
---
> 		strncpy(tmp, 
> 			(strrchr(dev, '/') != NULL) ? strrchr(dev, '/') : dev,
> 			MAX_STR_LEN);
429c438
< 		strcpy(siz, tmp);
---
> 		strncpy(siz, tmp, MAX_STR_LEN);
600c609
< 		strcpy(suffix, ++p);
---
> 		strncpy(suffix, ++p, MAX_STR_LEN);
1131c1140
< 	strcpy(filename, tempblock + 1000);
---
> 	strncpy(filename, tempblock + 1000, TAPE_BLOCK_SIZE - 1000);
1195c1204
< 	strcpy(g_tapecatalog->el[last].fname, fname);
---
> 	strncpy(g_tapecatalog->el[last].fname, fname, MAX_TAPECAT_FNAME_LEN);
1733c1742
< 	strcpy(tempblock + 1000, filename);
---
> 	strncpy(tempblock + 1000, filename, TAPE_BLOCK_SIZE - 1000);
Only in sandbox/mondo-2.2.1/src/common: libmondo-stream.c~
diff -r mondo-2.2.1/src/common/libmondo-string.c sandbox/mondo-2.2.1/src/common/libmondo-string.c
99c99
< 	strcpy(scratch, p);
---
> 	strncpy(scratch, p, MAX_STR_LEN);
147,150c147,151
< 	strcpy(tmp, input);
< 	if (strlen(tmp) > 6) {
< 		strcpy(pos_w_commas, tmp);
< 		j = (int) strlen(pos_w_commas);
---
> 	strncpy(tmp, input, MAX_STR_LEN);
> 	j = (int) strlen(tmp);
> 	if (j > 6) {
> 		strncpy(pos_w_commas, tmp, MAX_STR_LEN);
> /*		j = (int) strlen(pos_w_commas); // deja vu */
152c153
< 		strcpy(tmp + j - 5, pos_w_commas + j - 6);
---
> 		strncpy(tmp + j - 5, pos_w_commas + j - 6, 6);
155c156
< 		strcpy(pos_w_commas, tmp);
---
> 		strncpy(pos_w_commas, tmp, MAX_STR_LEN);
157,159c158,160
< 	if (strlen(tmp) > 3) {
< 		j = (int) strlen(tmp);
< 		strcpy(pos_w_commas, tmp);
---
> 	j = (int) strlen(tmp); /* needs update */
> 	if (j > 3) {
> 		strncpy(pos_w_commas, tmp, MAX_STR_LEN);
163c164
< 		strcpy(pos_w_commas, tmp);
---
> 		strncpy(pos_w_commas, tmp, MAX_STR_LEN);
165c166
< 	strcpy(output, pos_w_commas);
---
> 	strncpy(output, pos_w_commas, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-string.c~
diff -r mondo-2.2.1/src/common/libmondo-tools.c sandbox/mondo-2.2.1/src/common/libmondo-tools.c
380c380
< 	strcpy(tmp, call_program_and_get_last_line_of_output("uname -r"));
---
> 	strncpy(tmp, call_program_and_get_last_line_of_output("uname -r"), 200);
498c498
< 	strcpy(output, o);
---
> 	strncpy(output, o, MAX_STR_LEN);
614,616c614,617
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("vmstat | tail -1 | tr -s ' ' | cut -d' ' -f6"));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output
> 		    ("vmstat | tail -1 | tr -s ' ' | cut -d' ' -f6"),
> 		MAX_STR_LEN);
618,620c619,622
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("swapinfo | grep -v Device | tr -s ' ' | cut -d' ' -f4 | tr '\n' '+' | sed 's/+$//' | bc"));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output
> 		   ("swapinfo | grep -v Device | tr -s ' ' | cut -d' ' -f4 | tr '\n' '+' | sed 's/+$//' | bc"),
> 		MAX_STR_LEN);
625,627c627,630
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1"));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output
> 		("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1"),
> 		MAX_STR_LEN);
731c734
< 			strcpy(mondo_mkisofs_sz, MONDO_MKISOFS_NONBOOT);
---
> 			strncpy(mondo_mkisofs_sz, MONDO_MKISOFS_NONBOOT, MAX_STR_LEN);
744c747
< 		strcpy(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_LILO);
---
> 		strncpy(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_LILO, MAX_STR_LEN);
749c752
< 			strcpy(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_SYSLINUX);
---
> 			strncpy(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_SYSLINUX, MAX_STR_LEN);
845c848
< 		strcpy(hostname, bkpinfo->nfs_mount);
---
> 		strncpy(hostname, bkpinfo->nfs_mount, MAX_STR_LEN);
1032c1035
< 	strcpy(out_sz, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(out_sz, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
1076,1078c1079,1082
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2"));
---
> 	strncpy(tmp,
> 		call_program_and_get_last_line_of_output
> 		   ("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2"),
> 		MAX_STR_LEN);
1166,1168c1170,1173
< 	strcpy(tmp,
< 		   call_program_and_get_last_line_of_output
< 		   ("mount | grep -E \"cdr(om|w)\""));
---
> 	strncpy(tmp,
> 	       call_program_and_get_last_line_of_output
> 		   ("mount | grep -E \"cdr(om|w)\""),
> 	       MAX_STR_LEN);
1349c1354
< 		strcpy(g_autofs_exe, XANDROS_AUTOFS_FNAME);
---
> 		strncpy(g_autofs_exe, XANDROS_AUTOFS_FNAME, MAX_STR_LEN);
1351c1356
< 		strcpy(g_autofs_exe, STOCK_AUTOFS_FNAME);
---
> 		strncpy(g_autofs_exe, STOCK_AUTOFS_FNAME, MAX_STR_LEN);
1405c1410
< 	strcpy(tmp, call_program_and_get_last_line_of_output(command));
---
> 	strncpy(tmp, call_program_and_get_last_line_of_output(command), MAX_STR_LEN);
1420c1425
< 				strcpy(g_boot_mountpt, tmp);
---
> 				strncpy(g_boot_mountpt, tmp, MAX_STR_LEN);
1489,1491c1494,1497
< 	strcpy(tempfile,
< 		   call_program_and_get_last_line_of_output
< 		   ("mktemp -q /tmp/mojo-jojo.blah.XXXXXX"));
---
> 	strncpy(tempfile,
> 	       call_program_and_get_last_line_of_output
> 		   ("mktemp -q /tmp/mojo-jojo.blah.XXXXXX"),
> 	       MAX_STR_LEN);
1657,1659c1663,1666
< 	strcpy(g_magicdev_command,
< 		   call_program_and_get_last_line_of_output
< 		   ("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99"));
---
> 	strncpy(g_magicdev_command,
> 		call_program_and_get_last_line_of_output
> 		   ("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99"),
> 		MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-tools.c~
diff -r mondo-2.2.1/src/common/libmondo-verify.c sandbox/mondo-2.2.1/src/common/libmondo-verify.c
767c767
< 	strcpy(biggie_cksum, slice_fnam);
---
> 	strncpy(biggie_cksum, slice_fnam, MAX_STR_LEN);
769c769
< 		strcpy(orig_cksum, calc_checksum_of_file(biggie_fname));
---
> 		strncpy(orig_cksum, calc_checksum_of_file(biggie_fname), MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: libmondo-verify.c~
diff -r mondo-2.2.1/src/common/newt-specific.c sandbox/mondo-2.2.1/src/common/newt-specific.c
561,562c561,566
< 						strcpy(tmp, err_log_lines[i] + 6);
< 						strcpy(err_log_lines[i], tmp);
---
> 						strncpy(tmp, 
> 							err_log_lines[i] + 6,
> 							MAX_STR_LEN);
> 						strncpy(err_log_lines[i], 
> 							tmp,
> 							MAX_NEWT_COMMENT_LEN);
606a611,612
> 			  /* If I understand well there is something weird here	*/
> 			  /* copy "  " onto err_log_lines[i-1] then erasing ?!?	*/
609c615,617
< 				strcpy(err_log_lines[i - 1], err_log_lines[i]);
---
> 				strncpy(err_log_lines[i - 1],
> 					err_log_lines[i],
> 					MAX_NEWT_COMMENT_LEN);
621c629,631
< 			strcpy(err_log_lines[g_noof_log_lines - 1], output);
---
> 			strncpy(err_log_lines[g_noof_log_lines - 1], 
> 				output,
> 				MAX_NEWT_COMMENT_LEN);
672,673c682,683
< 		strcpy(title, ttl);
< 		strcpy(g_isoform_header_str, title);
---
> 		strncpy(title, ttl, MAX_STR_LEN);
> 		strncpy(g_isoform_header_str, title, MAX_STR_LEN);
678c688
< 			strcpy(tmp, title);
---
> 			strncpy(tmp, title, MAX_STR_LEN);
738,741c748,751
< 		strcpy(blurb1, b1);
< 		strcpy(blurb2, b2);
< 		strcpy(blurb3, b3);
< 		strcpy(b1c, b1);
---
> 		strncpy(blurb1, b1, MAX_STR_LEN);
> 		strncpy(blurb2, b2, MAX_STR_LEN);
> 		strncpy(blurb3, b3, MAX_STR_LEN);
> 		strncpy(b1c, b1, MAX_STR_LEN);
750,752c760,762
< 		strcpy(g_blurb_str_1, blurb1);
< 		strcpy(g_blurb_str_2, blurb3);
< 		strcpy(g_blurb_str_3, blurb2);
---
> 		strncpy(g_blurb_str_1, blurb1, MAX_NEWT_COMMENT_LEN);
> 		strncpy(g_blurb_str_2, blurb3, MAX_NEWT_COMMENT_LEN);
> 		strncpy(g_blurb_str_3, blurb2, MAX_NEWT_COMMENT_LEN);
844c854
< 		strcpy(blurb, b);
---
> 		strncpy(blurb, b, MAX_NEWT_COMMENT_LEN);
846c856
< 		strcpy(original_contents, output);
---
> 		strncpy(original_contents, output, MAX_NEWT_COMMENT_LEN);
1167c1177
< 		strcpy(g_blurb_str_2, blurb3);
---
> 		strncpy(g_blurb_str_2, blurb3, MAX_NEWT_COMMENT_LEN);
1523c1533,1535
< 			strcpy(filelist->el[filelist->entries].filename, tmp);
---
> 			strncpy(filelist->el[filelist->entries].filename, 
> 				tmp,
> 				MAX_STR_LEN);
1591c1603
< 		strcpy(comment, tmp);
---
> 		strncpy(comment, tmp, MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/common: newt-specific.c~
diff -r mondo-2.2.1/src/mondorestore/mondo-prep.c sandbox/mondo-2.2.1/src/mondorestore/mondo-prep.c
454c454
< 			strcpy(tmp, p + strlen("vgcreate") + 1);
---
> 			strncpy(tmp, p + strlen("vgcreate") + 1, MAX_STR_LEN);
469c469
< 		strcpy(command, p);
---
> 		strncpy(command, p, MAX_STR_LEN);
488,489c488,491
< 				strcpy(tmp, call_program_and_get_last_line_of_output
< 					   ("tail -n5 /var/log/mondo-archive.log | grep Insufficient | tail -n1"));
---
> 				strncpy(tmp, 
> 				       call_program_and_get_last_line_of_output
> 					   ("tail -n5 /var/log/mondo-archive.log | grep Insufficient | tail -n1"), 
> 				       MAX_STR_LEN);
491,492c493,496
< 				strcpy(tmp, call_program_and_get_last_line_of_output
< 					   ("tail -n5 /var/log/mondo-archive.log | grep lvcreate | tail -n1"));
---
> 				strncpy(tmp, 
> 					call_program_and_get_last_line_of_output
> 					   ("tail -n5 /var/log/mondo-archive.log | grep lvcreate | tail -n1"),
> 					MAX_STR_LEN);
1768c1772
< 			strcpy(format, mountlist->el[lino].format);
---
> 			strncpy(format, mountlist->el[lino].format, MAX_STR_LEN);
1979c1983
< 		strcpy(tmp, last_line_of_file(FDISK_LOG));
---
> 		strncpy(tmp, last_line_of_file(FDISK_LOG), MAX_STR_LEN);
2224c2228
< 		strcpy(partcode, format);
---
> 		strncpy(partcode, format, MAX_STR_LEN);
2232c2236
< 		strcpy(partcode, format);	// was a5
---
> 		strncpy(partcode, format, MAX_STR_LEN);	// was a5
2234c2238
< 		strcpy(partcode, format);	// was 83
---
> 		strncpy(partcode, format, MAX_STR_LEN);	// was 83
2262c2266
< 			strcpy(tmp, last_line_of_file(FDISK_LOG));
---
> 			strncpy(tmp, last_line_of_file(FDISK_LOG), MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/mondorestore: mondo-prep.c~
diff -r mondo-2.2.1/src/mondorestore/mondo-restore.c sandbox/mondo-2.2.1/src/mondorestore/mondo-restore.c
528,529c528,529
< 								struct mountlist_itself *mountlist,
< 								struct raidlist_itself *raidlist)
---
> 				struct mountlist_itself *mountlist,
> 				struct raidlist_itself *raidlist)
539c539
< 		strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
---
> 		strncpy(g_mountlist_fname, "/tmp/mountlist.txt", MAX_STR_LEN);
910c910
< 		strcpy(old_restpath, bkpinfo->restore_path);
---
> 		strncpy(old_restpath, bkpinfo->restore_path, MAX_STR_LEN);
919c919
< 				strcpy(tmp, old_restpath);
---
> 				strncpy(tmp, old_restpath, MAX_STR_LEN);
930c930
< 					strcpy(bkpinfo->restore_path, tmp);
---
> 					strncpy(bkpinfo->restore_path, tmp, MAX_STR_LEN);
935c935,937
< 					strcpy(bkpinfo->restore_path, old_restpath);
---
> 					strncpy(bkpinfo->restore_path, 
> 					       old_restpath, 
> 					       MAX_STR_LEN);
946c948
< 		strcpy(old_restpath, bkpinfo->restore_path);
---
> 		strncpy(old_restpath, bkpinfo->restore_path, MAX_STR_LEN);
1316c1318
< 		strcpy(old_restpath, bkpinfo->restore_path);
---
> 		strncpy(old_restpath, bkpinfo->restore_path, MAX_STR_LEN);
1323c1325
< 			strcpy(bkpinfo->restore_path, old_restpath);
---
> 			strncpy(bkpinfo->restore_path, old_restpath, MAX_STR_LEN);
1327c1329
< 		strcpy(bkpinfo->restore_path, old_restpath);
---
> 		strncpy(bkpinfo->restore_path, old_restpath, MAX_STR_LEN);
1426c1428
< 	strcpy(checksum, biggiestruct.checksum);
---
> 	strncpy(checksum, biggiestruct.checksum, MAX_STR_LEN);
1437c1439
< 		strcpy(outfile_fname, biggiestruct.filename);
---
> 		strncpy(outfile_fname, biggiestruct.filename, MAX_STR_LEN);
1481c1483
< 		strcpy(ntfsprog_fifo, sz_devfile);
---
> 		strncpy(ntfsprog_fifo, sz_devfile, MAX_STR_LEN);
1557,1558c1559,1561
< 			strcpy(tmp,
< 				   slice_fname(bigfileno, sliceno, ARCHIVES_PATH, ""));
---
> 			strncpy(tmp,
> 				slice_fname(bigfileno, sliceno, ARCHIVES_PATH, ""),
> 				MAX_STR_LEN);
1784c1787
< 		strcpy(outfile_fname, orig_bf_fname);
---
> 		strncpy(outfile_fname, orig_bf_fname, MAX_STR_LEN);
1794c1797
< 		strcpy(ntfsprog_fifo, sz_devfile);
---
> 		strncpy(ntfsprog_fifo, sz_devfile, MAX_STR_LEN);
1801,1802c1804,1805
< 					"CHILD - fip - calling feed_outfrom_ntfsprog(%s, %s)",
< 					outfile_fname, ntfsprog_fifo);
---
> 				"CHILD - fip - calling feed_outfrom_ntfsprog(%s, %s)",
> 				outfile_fname, ntfsprog_fifo);
1816c1819
< 			strcpy(outfile_fname, orig_bf_fname);
---
> 			strncpy(outfile_fname, orig_bf_fname, MAX_STR_LEN);
2059c2062
< 			strcpy(tmp, executable);
---
> 			strncpy(tmp, executable, MAX_STR_LEN);
2634c2637
< 			strcpy(comment, tmp);
---
> 			strncpy(comment, tmp, MAX_STR_LEN);
3292,3293c3295,3297
< 	strcpy(g_mondo_home,
< 		   call_program_and_get_last_line_of_output("which mondorestore"));
---
> 	strncpy(g_mondo_home,
> 		call_program_and_get_last_line_of_output("which mondorestore"), 
> 		MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/mondorestore: mondo-restore.c~
diff -r mondo-2.2.1/src/mondorestore/mondo-rstr-compare.c sandbox/mondo-2.2.1/src/mondorestore/mondo-rstr-compare.c
145,146c145,146
< 	strcpy(checksum_ptr, biggiestruct.checksum);
< 	strcpy(bigfile_fname_ptr, biggiestruct.filename);
---
> 	strncpy(checksum_ptr, biggiestruct.checksum, MAX_STR_LEN);
> 	strncpy(bigfile_fname_ptr, biggiestruct.filename, MAX_STR_LEN);
334c334
< 		strcpy(tmp, compressor_exe);
---
> 		strncpy(tmp, compressor_exe, MAX_STR_LEN);
651,652c651,653
< 			strcpy(tmp,
< 				   "Type 'less /tmp/changed.files' for a list of non-matching files");
---
> 			strncpy(tmp,
> 				"Type 'less /tmp/changed.files' for a list of non-matching files", 
> 				MAX_STR_LEN);
702,703c703,705
< 		strcpy(bkpinfo->media_device,
< 			   last_line_of_file("/tmp/CDROM-LIVES-HERE"));
---
> 		strncpy(bkpinfo->media_device,
> 			last_line_of_file("/tmp/CDROM-LIVES-HERE"),
> 			MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/mondorestore: mondo-rstr-compare.c~
diff -r mondo-2.2.1/src/mondorestore/mondo-rstr-newt.c sandbox/mondo-2.2.1/src/mondorestore/mondo-rstr-newt.c
185,186c185,186
< 			strcpy(disklist->el[items].device,
< 				   unallocated_raid_partitions->el[currline].device);
---
> 			strncpy(disklist->el[items].device,
> 				   unallocated_raid_partitions->el[currline].device, 64);
282,285c282,285
< 		strcpy(device_str, device_here);
< 		strcpy(mountpoint_str, mountpoint_here);
< 		strcpy(format_str, format_here);
< 		strcpy(size_str, size_here);
---
> 		strncpy(device_str, device_here, MAX_STR_LEN);
> 		strncpy(mountpoint_str, mountpoint_here, MAX_STR_LEN);
> 		strncpy(format_str, format_here, MAX_STR_LEN);
> 		strncpy(size_str, size_here, MAX_STR_LEN);
310c310
< 	strcpy(drive_to_add, device_str);
---
> 	strncpy(drive_to_add, device_str, MAX_STR_LEN);
315,317c315,317
< 	strcpy(mountlist->el[currline].device, device_str);
< 	strcpy(mountlist->el[currline].mountpoint, mountpoint_str);
< 	strcpy(mountlist->el[currline].format, format_str);
---
> 	strncpy(mountlist->el[currline].device, device_str, MAX_STR_LEN);
> 	strncpy(mountlist->el[currline].mountpoint, mountpoint_str, MAX_STR_LEN);
> 	strncpy(mountlist->el[currline].format, format_str, MAX_STR_LEN);
356,357c356,357
< 			popup_and_OK
< 				("No need to add that variable. It is already listed here.");
---
> 		  popup_and_OK
> 		    ("No need to add that variable. It is already listed here.");
359c359,361
< 			strcpy(raidrec->additional_vars.el[items].label, sz_out);
---
> 			strncpy(raidrec->additional_vars.el[items].label, 
> 				sz_out, 
> 				MAX_STR_LEN);
423c425
< 			strcpy(devname, raidrec->plex[j].sd[k].which_device);
---
> 			strncpy(devname, raidrec->plex[j].sd[k].which_device, 64);
572c574
< 			strcpy(sz, tmp);
---
> 			strncpy(sz, tmp, MAX_STR_LEN);
608,609c610,612
< 	strcpy(personalities,
< 		   last_line_of_file("/tmp/raid-personalities.txt"));
---
> 	strncpy(personalities,
> 		last_line_of_file("/tmp/raid-personalities.txt"), 
> 		MAX_STR_LEN);
626c629
< 			strcpy(sz, tmp);
---
> 			strncpy(sz, tmp, MAX_STR_LEN);
976,977c979,981
< 				strcpy(g_strings_of_flist_window[lines_in_flist_window],
< 					   current_filename);
---
> 				strncpy(g_strings_of_flist_window[lines_in_flist_window],
> 					current_filename, 
> 					MAX_STR_LEN);
992c996
< 				strcpy(tmp, g_strings_of_flist_window[i]);
---
> 				strncpy(tmp, g_strings_of_flist_window[i], MAX_STR_LEN);
995c999
< 				strcpy(g_strings_of_flist_window[i - 1], tmp);
---
> 				strncpy(g_strings_of_flist_window[i - 1], tmp, MAX_STR_LEN);
1064c1068
< 	strcpy(tmpprevpath, tmpnopath);	/* Make a copy for next iteration */
---
> 	strncpy(tmpprevpath, tmpnopath, MAX_STR_LEN);	/* Make a copy for next iteration */
1266,1270c1270,1274
< 	strcpy(device_str, mountlist->el[currline].device);
< 	strcpy(device_used_to_be, mountlist->el[currline].device);
< 	strcpy(mountpoint_str, mountlist->el[currline].mountpoint);
< 	strcpy(mountpt_used_to_be, mountlist->el[currline].mountpoint);
< 	strcpy(format_str, mountlist->el[currline].format);
---
> 	strncpy(device_str, mountlist->el[currline].device, MAX_STR_LEN);
> 	strncpy(device_used_to_be, mountlist->el[currline].device, MAX_STR_LEN);
> 	strncpy(mountpoint_str, mountlist->el[currline].mountpoint, MAX_STR_LEN);
> 	strncpy(mountpt_used_to_be, mountlist->el[currline].mountpoint, MAX_STR_LEN);
> 	strncpy(format_str, mountlist->el[currline].format, MAX_STR_LEN);
1302c1306
< 		strcpy(device_str, device_here);
---
> 		strncpy(device_str, device_here, MAX_STR_LEN);
1304c1308
< 		strcpy(mountpoint_str, mountpoint_here);
---
> 		strncpy(mountpoint_str, mountpoint_here, MAX_STR_LEN);
1306c1310
< 		strcpy(format_str, format_here);
---
> 		strncpy(format_str, format_here, MAX_STR_LEN);
1322c1326
< 			strcpy(size_str, size_here);
---
> 			strncpy(size_str, size_here, MAX_STR_LEN);
1365,1367c1369,1371
< 	strcpy(mountlist->el[currline].device, device_str);
< 	strcpy(mountlist->el[currline].mountpoint, mountpoint_str);
< 	strcpy(mountlist->el[currline].format, format_str);
---
> 	strncpy(mountlist->el[currline].device, device_str, MAX_STR_LEN);
> 	strncpy(mountlist->el[currline].mountpoint, mountpoint_str, MAX_STR_LEN);
> 	strncpy(mountlist->el[currline].format, format_str, MAX_STR_LEN);
1436c1440,1442
< 		strcpy(raidlist->disks.el[raidlist->disks.entries++].device, temp);
---
> 		strncpy(raidlist->disks.el[raidlist->disks.entries++].device, 
> 		       temp, 
> 		       MAX_STR_LEN);
1967c1973
< 	strcpy(sz_out, raidrec->additional_vars.el[lino].value);
---
> 	strncpy(sz_out, raidrec->additional_vars.el[lino].value, MAX_STR_LEN);
1973c1979
< 		strcpy(raidrec->additional_vars.el[lino].value, sz_out);
---
> 		strncpy(raidrec->additional_vars.el[lino].value, sz_out, MAX_STR_LEN);
2670,2672c2676,2678
< 												   *raidlist,
< 												   char *old_dev,
< 												   char *new_dev)
---
> 						   *raidlist,
> 						   char *old_dev,
> 						   char *new_dev)
Only in sandbox/mondo-2.2.1/src/mondorestore: mondo-rstr-newt.c~
diff -r mondo-2.2.1/src/mondorestore/mondo-rstr-tools.c sandbox/mondo-2.2.1/src/mondorestore/mondo-rstr-tools.c
394c394
< 		strcpy(file, f + strlen(preamble));
---
> 		strncpy(file, f + strlen(preamble), MAX_STR_LEN);
396c396
< 		strcpy(file, f);
---
> 		strncpy(file, f, MAX_STR_LEN);
399,400c399,400
< 		strcpy(tmp, file);
< 		strcpy(file, tmp + 1);
---
> 		strncpy(tmp, file, MAX_STR_LEN);
> 		strncpy(file, tmp + 1, MAX_STR_LEN);
643c643
< 			strcpy(format, mountlist->el[lino].format);
---
> 			strncpy(format, mountlist->el[lino].format, MAX_STR_LEN);
850c850
< 		strcpy(mountpoint, mpt);
---
> 		strncpy(mountpoint, mpt, MAX_STR_LEN);
1000c1000
< 		strcpy(cfg_file, g_mondo_cfg_file);
---
> 		strncpy(cfg_file, g_mondo_cfg_file, MAX_STR_LEN);
1002c1002
< 		strcpy(cfg_file, cfgf);
---
> 		strncpy(cfg_file, cfgf, MAX_STR_LEN);
1041c1041
< 					strcpy(bkpinfo->prefix,value);
---
> 					strncpy(bkpinfo->prefix, value, MAX_STR_LEN);
1043c1043
< 					strcpy(bkpinfo->prefix,STD_PREFIX);
---
> 					strcpy(bkpinfo->prefix, STD_PREFIX);
1048c1048
< 					strcpy(bkpinfo->prefix,value);
---
> 					strncpy(bkpinfo->prefix, value, MAX_STR_LEN);
1050c1050
< 					strcpy(bkpinfo->prefix,STD_PREFIX);
---
> 					strcpy(bkpinfo->prefix, STD_PREFIX);
1060c1060
< 				strcpy(bkpinfo->prefix,envtmp1);
---
> 				strncpy(bkpinfo->prefix, envtmp1, MAX_STR_LEN);
1084c1084
< 			strcpy(bkpinfo->media_device, value);
---
> 			strncpy(bkpinfo->media_device, value, MAX_STR_LEN);
1209,1210c1209,1210
< 			strcpy(bkpinfo->nfs_mount,envtmp1);
< 			strcpy(bkpinfo->nfs_remote_dir,envtmp2);
---
> 			strcpy(bkpinfo->nfs_mount, envtmp1);
> 			strcpy(bkpinfo->nfs_remote_dir, envtmp2);
1217c1217
< 		strcpy(old_isodir, bkpinfo->isodir);
---
> 		strncpy(old_isodir, bkpinfo->isodir, MAX_STR_LEN);
1222c1222
< 			strcpy(bkpinfo->isodir, old_isodir);
---
> 			strncpy(bkpinfo->isodir, old_isodir, MAX_STR_LEN);
1229c1229
< 				strcpy(bkpinfo->isodir, old_isodir);
---
> 				strncpy(bkpinfo->isodir, old_isodir, MAX_STR_LEN);
1662c1662
< 	strcpy(boot_device, bd);
---
> 	strncpy(boot_device, bd, MAX_STR_LEN);
1775c1775
< 	strcpy(editor, find_my_editor());
---
> 	strncpy(editor, find_my_editor(), MAX_STR_LEN);
1850c1850
< 	strcpy(editor, find_my_editor());
---
> 	strncpy(editor, find_my_editor(), MAX_STR_LEN);
1959,1960c1959,1960
< 	strcpy(editor, find_my_editor());
< 	strcpy(boot_device, bd);
---
> 	strncpy(editor, find_my_editor(), MAX_STR_LEN);
> 	strncpy(boot_device, bd, MAX_STR_LEN);
2479c2479
< 			strcpy(tmp, bkpinfo->media_device);
---
> 			strncpy(tmp, bkpinfo->media_device, MAX_STR_LEN);
2493c2493,2495
< 							strcpy(bkpinfo->media_device, tmp);
---
> 							strncpy(bkpinfo->media_device, 
> 								tmp, 
> 								MAX_STR_LEN);
Only in sandbox/mondo-2.2.1/src/mondorestore: mondo-rstr-tools.c~
