Skip to content

Commit

Permalink
OS-573 "svcs -o ctid" gives potentially corrupted output
Browse files Browse the repository at this point in the history
  • Loading branch information
bcantrill committed Aug 30, 2011
1 parent 08d8007 commit 010256d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usr/src/cmd/svc/svcs/svcs.c
Expand Up @@ -1020,13 +1020,14 @@ reverse_bytes(char *buf, size_t len)

/* CTID */
#define CTID_COLUMN_WIDTH 6
#define CTID_COLUMN_BUFSIZE 20 /* max ctid_t + space + \0 */

static void
sprint_ctid(char **buf, scf_walkinfo_t *wip)
{
int r;
uint64_t c;
size_t newsize = (*buf ? strlen(*buf) : 0) + CTID_COLUMN_WIDTH + 2;
size_t newsize = (*buf ? strlen(*buf) : 0) + CTID_COLUMN_BUFSIZE;
char *newbuf = safe_malloc(newsize);
int restarter_spec;

Expand Down

0 comments on commit 010256d

Please sign in to comment.