Audit paste(1)
Well, basically there was not a lot to do, as I already (fortunately) audited this code a while back. There were only minor style-changes.
This commit is contained in:
		
							
								
								
									
										2
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								README
									
									
									
									
									
								
							@@ -51,7 +51,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
 | 
				
			|||||||
=*| nice            yes                          none
 | 
					=*| nice            yes                          none
 | 
				
			||||||
=   nl              no                           -d, -f, -h, -p
 | 
					=   nl              no                           -d, -f, -h, -p
 | 
				
			||||||
=*| nohup           yes                          none
 | 
					=*| nohup           yes                          none
 | 
				
			||||||
#*  paste           yes                          none
 | 
					#*| paste           yes                          none
 | 
				
			||||||
=*| printenv        non-posix                    none
 | 
					=*| printenv        non-posix                    none
 | 
				
			||||||
#*  printf          yes                          none
 | 
					#*  printf          yes                          none
 | 
				
			||||||
=*| pwd             yes                          none
 | 
					=*| pwd             yes                          none
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								paste.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								paste.c
									
									
									
									
									
								
							@@ -102,7 +102,7 @@ main(int argc, char *argv[])
 | 
				
			|||||||
		usage();
 | 
							usage();
 | 
				
			||||||
	} ARGEND;
 | 
						} ARGEND;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (argc == 0)
 | 
						if (!argc)
 | 
				
			||||||
		usage();
 | 
							usage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* populate delimiters */
 | 
						/* populate delimiters */
 | 
				
			||||||
@@ -114,7 +114,7 @@ main(int argc, char *argv[])
 | 
				
			|||||||
	dsc = ereallocarray(NULL, argc, sizeof(*dsc));
 | 
						dsc = ereallocarray(NULL, argc, sizeof(*dsc));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < argc; i++) {
 | 
						for (i = 0; i < argc; i++) {
 | 
				
			||||||
		if (strcmp(argv[i], "-") == 0)
 | 
							if (!strcmp(argv[i], "-"))
 | 
				
			||||||
			dsc[i].fp = stdin;
 | 
								dsc[i].fp = stdin;
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			dsc[i].fp = fopen(argv[i], "r");
 | 
								dsc[i].fp = fopen(argv[i], "r");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user