Changeset 34 for trunk/src/sh_err_log.c
- Timestamp:
- May 19, 2006, 8:09:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_err_log.c
r22 r34 390 390 (void) fflush(stdout); 391 391 key[0] = '\0'; 392 (void) fgets(key, KEY_LEN+2, stdin);392 (void) fgets(key, sizeof(key), stdin); 393 393 if (key[0] != '\n') 394 394 { … … 553 553 { 554 554 tmp = sh_util_safe_name (logfile); 555 len = 6 + sl_strlen(tmp); 555 len = sl_strlen(tmp); 556 if (sl_ok_adds (6, len)) 557 len += 6; 556 558 lockfile = SH_ALLOC(len); 557 559 (void) sl_strlcpy(lockfile, tmp, len); … … 634 636 635 637 SL_TICKET fd = -1; 636 long intstatus;638 size_t status; 637 639 struct _sh_log_buf log_msg; 638 640 … … 749 751 */ 750 752 751 status = (long) sl_strlen (errmsg); 753 status = sl_strlen (errmsg); 754 if (!sl_ok_adds(status, (2*KEY_LEN)) || !sl_ok_adds((2*KEY_LEN + status),32)) 755 { 756 SL_RETURN ((-1), _("sh_log_file")); 757 } 758 752 759 log_msg.msg = (char *) SH_ALLOC ((size_t) (2*KEY_LEN + status + 32)); 753 760
Note:
See TracChangeset
for help on using the changeset viewer.