Import OpenBSD cvs as of roughly 11:11 UTC today,
or CTM delta 3188/3189/3190.
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| /*	$OpenBSD: history.c,v 1.17 2003/02/28 09:45:09 jmc Exp $	*/ | /*	$OpenBSD: history.c,v 1.18 2003/04/06 23:39:17 deraadt Exp $	*/ | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * command history |  * command history | ||||||
| @@ -93,8 +93,9 @@ c_fc(wp) | |||||||
| 			if (strcmp(p, "-") == 0) | 			if (strcmp(p, "-") == 0) | ||||||
| 				sflag++; | 				sflag++; | ||||||
| 			else { | 			else { | ||||||
| 				editor = str_nsave(p, strlen(p) + 4, ATEMP); | 				size_t len = strlen(p) + 4; | ||||||
| 				strcat(editor, " $_"); | 				editor = str_nsave(p, len, ATEMP); | ||||||
|  | 				strlcat(editor, " $_", len); | ||||||
| 			} | 			} | ||||||
| 			break; | 			break; | ||||||
| 		  case 'g': /* non-at&t ksh */ | 		  case 'g': /* non-at&t ksh */ | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.c
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| /*	$OpenBSD: main.c,v 1.23 2003/03/10 03:48:16 david Exp $	*/ | /*	$OpenBSD: main.c,v 1.24 2003/04/04 23:12:02 deraadt Exp $	*/ | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * startup, main loop, environments and error handling |  * startup, main loop, environments and error handling | ||||||
| @@ -829,7 +829,7 @@ remove_temps(tp) | |||||||
| 				    APERM); | 				    APERM); | ||||||
| 				memset(t, 0, sizeof(struct temp)); | 				memset(t, 0, sizeof(struct temp)); | ||||||
| 				t->name = (char *) &t[1]; | 				t->name = (char *) &t[1]; | ||||||
| 				strcpy(t->name, tp->name); | 				strlcpy(t->name, tp->name, strlen(tp->name) + 1); | ||||||
| 				t->next = delayed_remove; | 				t->next = delayed_remove; | ||||||
| 				delayed_remove = t; | 				delayed_remove = t; | ||||||
| 			} | 			} | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								misc.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								misc.c
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| /*	$OpenBSD: misc.c,v 1.14 2003/03/13 09:03:07 deraadt Exp $	*/ | /*	$OpenBSD: misc.c,v 1.15 2003/04/04 23:12:02 deraadt Exp $	*/ | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Miscellaneous functions |  * Miscellaneous functions | ||||||
| @@ -83,7 +83,17 @@ str_save(s, ap) | |||||||
| 	register const char *s; | 	register const char *s; | ||||||
| 	Area *ap; | 	Area *ap; | ||||||
| { | { | ||||||
| 	return s ? strcpy((char*) alloc((size_t)strlen(s)+1, ap), s) : NULL; | 	size_t len; | ||||||
|  | 	char *p; | ||||||
|  |  | ||||||
|  | 	if (!s) | ||||||
|  | 		return NULL; | ||||||
|  | 	len = strlen(s)+1; | ||||||
|  | 	p = alloc(len, ap); | ||||||
|  | 	if (!p) | ||||||
|  | 		return NULL; | ||||||
|  | 	strlcpy(p, s, len+1); | ||||||
|  | 	return (p); | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Allocate a string of size n+1 and copy upto n characters from the possibly | /* Allocate a string of size n+1 and copy upto n characters from the possibly | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user