[Tizen-submit] 24469: Changes to Tizen:Mobile/libprivilege-control

noreply at tizen.org noreply at tizen.org
Wed Mar 19 14:20:00 GMT 2014


Hi,
Zofia Abramowska have made the following changes to libprivilege-control in project Tizen:Mobile. Please review and accept ASAP.

Thank You,

[This message was auto-generated]

---

Request: #24469

  submit:       Tizen:Mobile:build/libprivilege-control(cleanup) -> Tizen:Mobile


Message:
Submitter: Zofia Abramowska <z.abramowska at samsung.com>
Comments: release for x86_64 build fix
Git project: platform/core/security/libprivilege-control
Tag: submit/tizen/20140319.141934
Commit: 3887c2c7b94bb5473274e93f7479c572a412f9ef Fix integer types

State:   new        2014-03-19T14:19:36 tizenrobot
Comment: <no comment>
changes files:
--------------

spec files:
-----------
--- libprivilege-control.spec
+++ libprivilege-control.spec
@@ -1,5 +1,5 @@
 Name:       libprivilege-control
-VCS:        platform/core/security/libprivilege-control#479d21a75f061083c3957820cbb2f73756f48833
+VCS:        platform/core/security/libprivilege-control#3887c2c7b94bb5473274e93f7479c572a412f9ef
 Summary:    Library to control privilege of application
 Version:    0.0.43.TIZEN
 Release:    1

other changes:
--------------

++++++ libprivilege-control-0.0.43.TIZEN.tar.gz
--- src/common.c
+++ src/common.c
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
+#include <limits.h>
 #include <unistd.h>
 #include <sys/smack.h>
 #include <sys/stat.h>
@@ -462,9 +463,15 @@
 		return PC_ERR_INVALID_PARAM;
 	}
 
-	ssize_t i_host_size = strlen(piri_parsed->host);
-	ssize_t i_path_start = 0;
-	char * pc_host_dot = NULL;
+	size_t i_host_size = strlen(piri_parsed->host);
+	if(i_host_size > INT_MAX) {
+		SECURE_C_LOGE("Permission name too long : %zu", i_host_size);
+		iri_destroy(piri_parsed);
+		return PC_ERR_INVALID_PARAM;
+	}
+
+	size_t i_path_start = 0;
+	char *pc_host_dot = NULL;
 
 	if(piri_parsed->path) {
 		pc_host_dot = strrchr(piri_parsed->host, '.');
@@ -474,7 +481,7 @@
 	int ret = asprintf(ps_name, "%s%s%.*s%s",
 			   pc_host_dot ? pc_host_dot + 1 : "",
 			   pc_host_dot ? "." : "",
-			   pc_host_dot ? pc_host_dot - piri_parsed->host : i_host_size,
+			   pc_host_dot ? (int)(pc_host_dot - piri_parsed->host) : (int)i_host_size,
 			   piri_parsed->host,
 			   piri_parsed->path ? piri_parsed->path : "");
 	if (ret == -1) {


More information about the Tizen-submit mailing list