diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-12-09 08:22:19 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-12-09 08:22:19 +0000 |
| commit | 00b69db338558f07cd23191647a641b53fded983 (patch) | |
| tree | 703f1957c7cb4d3138f4dca933a94c51a76a6ae6 /usr.sbin/sysinstall/variable.c | |
| parent | 8bc3ddf57f95b8be12692eb1cc52d01bee4c7b1f (diff) | |
Notes
Diffstat (limited to 'usr.sbin/sysinstall/variable.c')
| -rw-r--r-- | usr.sbin/sysinstall/variable.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/sysinstall/variable.c b/usr.sbin/sysinstall/variable.c index 7d77d15841f5..013358ece8e1 100644 --- a/usr.sbin/sysinstall/variable.c +++ b/usr.sbin/sysinstall/variable.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: variable.c,v 1.10 1996/04/29 06:47:10 jkh Exp $ + * $Id: variable.c,v 1.11 1996/06/12 14:02:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -51,15 +51,15 @@ make_variable(char *var, char *value) if (!strcmp(newvar->name, var)) { if (isDebug()) msgDebug("variable %s was %s, now %s\n", newvar->name, newvar->value, value); - strncpy(newvar->value, value, VAR_VALUE_MAX); + SAFE_STRCPY(newvar->value, value); return; } } /* No? Create a new one */ newvar = (Variable *)safe_malloc(sizeof(Variable)); - strncpy(newvar->name, var, VAR_NAME_MAX); - strncpy(newvar->value, value, VAR_VALUE_MAX); + SAFE_STRCPY(newvar->name, var); + SAFE_STRCPY(newvar->value, value); newvar->next = VarHead; VarHead = newvar; if (isDebug()) @@ -75,7 +75,7 @@ variable_set(char *var) msgFatal("NULL variable name & value passed."); else if (!*var) msgDebug("Warning: Zero length name & value passed to variable_set()\n"); - strncpy(tmp, var, VAR_NAME_MAX + VAR_VALUE_MAX); + SAFE_STRCPY(tmp, var); if ((cp = index(tmp, '=')) == NULL) msgFatal("Invalid variable format: %s", var); *(cp++) = '\0'; |
