summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authoryi zhang - Sun Microsystems - Beijing China <Zhang.Yi@Sun.COM>2009-12-08 08:34:19 +0800
committeryi zhang - Sun Microsystems - Beijing China <Zhang.Yi@Sun.COM>2009-12-08 08:34:19 +0800
commit0f79c548a94d01d7494ec7ffa3bc72cda00b4f7c (patch)
tree04cfa572d19d14b7fc44f7cb7dd89975d1feb106 /usr/src
parent22bbd95e3be77066d326fc29c95eb88028ee9d2b (diff)
downloadillumos-gate-0f79c548a94d01d7494ec7ffa3bc72cda00b4f7c.tar.gz
6906409 ima.c code's lltostr() system call usage is incorrectly
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libsun_ima/common/ima.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/lib/libsun_ima/common/ima.c b/usr/src/lib/libsun_ima/common/ima.c
index 908ba12f74..b479cf4f95 100644
--- a/usr/src/lib/libsun_ima/common/ima.c
+++ b/usr/src/lib/libsun_ima/common/ima.c
@@ -3309,9 +3309,9 @@ IMA_API IMA_STATUS SUN_IMA_GetTunableProperties(
return (IMA_STATUS_SUCCESS);
}
value = (long long)pg.t_value.v_integer;
- ptr = lltostr(value, tmp);
+ ptr = lltostr(value, &tmp[MAX_LONG_LONG_STRING_LEN -1]);
if ((ptr != NULL) && (ptr != tmp)) {
- *(tmp + 1) = '\0';
+ tmp[MAX_LONG_LONG_STRING_LEN - 1] = '\0';
} else {
(void) close(fd);
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
@@ -3319,15 +3319,15 @@ IMA_API IMA_STATUS SUN_IMA_GetTunableProperties(
switch (param->tunable_objectType) {
case ISCSI_RX_TIMEOUT_VALUE:
(void) strlcpy(param->tunable_objectValue,
- ptr, strlen(ptr));
+ ptr, strlen(ptr) + 1);
break;
case ISCSI_CONN_DEFAULT_LOGIN_MAX:
(void) strlcpy(param->tunable_objectValue,
- ptr, strlen(ptr));
+ ptr, strlen(ptr) + 1);
break;
case ISCSI_LOGIN_POLLING_DELAY:
(void) strlcpy(param->tunable_objectValue,
- ptr, strlen(ptr));
+ ptr, strlen(ptr) + 1);
break;
default:
break;