diff options
| author | gww <none@none> | 2008-02-25 14:13:32 -0800 |
|---|---|---|
| committer | gww <none@none> | 2008-02-25 14:13:32 -0800 |
| commit | 4788ac756eabe459401493975c99a8f11bcce1a2 (patch) | |
| tree | 63a67880c821d9f1886e549959fbe9bd54cf8eb7 | |
| parent | 7b209c2cc5ea45251aba06dcc6181d3f23da807a (diff) | |
| download | illumos-joyent-4788ac756eabe459401493975c99a8f11bcce1a2.tar.gz | |
6530312 parser for M_INTERNAL labels overflows uchar_t in check of _c_len field
| -rw-r--r-- | usr/src/lib/libtsol/common/stol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/libtsol/common/stol.c b/usr/src/lib/libtsol/common/stol.c index cbdb2f3c8e..f9250488a7 100644 --- a/usr/src/lib/libtsol/common/stol.c +++ b/usr/src/lib/libtsol/common/stol.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -111,8 +111,8 @@ htol(char *s, m_label_t *l) if (!unhex(&h, &size, 1)) { return (-1); } - size *= sizeof (uint32_t); /* words to bytes */ - if (size > len) { + /* convert size from words to bytes */ + if ((size * sizeof (uint32_t)) > len) { /* * internal label greater than will fit in current * binary. |
