[Tizen-submit] 3375: Changes to Tizen:2.1:Main/emuld

noreply at tizen.org noreply at tizen.org
Fri Apr 26 14:23:46 GMT 2013


Hi,
Jinkun Jang have made the following changes to emuld in project Tizen:2.1:Main. Please review and accept ASAP.

Thank You,

[This message was auto-generated]

---

Request: #3375

  submit:       Tizen:2.1:Main:build/emuld(cleanup) -> Tizen:2.1:Main


Message:
Submitter: Jinkun Jang <jinkun.jang at samsung.com>
Comments: upload latest
Git project: sdk/emulator-daemon
Tag: submit/tizen_2.1/20130426.142414
Commit: 9b0317b emuld : memset vulnulability fixed

State:   new        2013-04-26T06:54:24 tizenrobot
Comment: <no comment>
old:
----
  emuld-0.2.35.tar.gz

new:
----
  emuld-0.2.36.tar.gz

spec files:
-----------
--- emuld.spec
+++ emuld.spec
@@ -1,8 +1,8 @@
 #git:/slp/pkgs/e/emulator-daemon
 Name: emuld
-Version: 0.2.35
+Version: 0.2.36
 Release: 1
-VCS:        sdk/emulator-daemon#2.1_release-0-g18b8d76
+VCS:        sdk/emulator-daemon#submit/tizen_2.1/20130426.142414-0-g9b0317b
 Summary: emuld is used for communication emulator between and ide.
 License: Apache
 Source0: %{name}-%{version}.tar.gz

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

++++++ emuld-0.2.35.tar.gz -> emuld-0.2.36.tar.gz
--- /packaging/emuld.spec
+++ /packaging/emuld.spec
@@ -1,6 +1,6 @@
 #git:/slp/pkgs/e/emulator-daemon
 Name: emuld
-Version: 0.2.35
+Version: 0.2.36
 Release: 1
 Summary: emuld is used for communication emulator between and ide.
 License: Apache
--- /src/emuld.c
+++ /src/emuld.c
@@ -594,11 +594,11 @@
 	    return -1;
 	}
 
-	memset(databuf, '\0', sizeof(*databuf));
+	memset(databuf, '\0', alloc_size);
 
 	while(recvd_size < size)
 	{
-		memset(r_tmpbuf, '\0', sizeof(*r_tmpbuf));
+		memset(r_tmpbuf, '\0', alloc_size);
 		len = recv(event_fd, r_tmpbuf, size - recvd_size, 0);
 		if (len < 0) {
 			break;
@@ -1298,7 +1298,13 @@
 //sdcard event
 void send_guest_server(char* databuf)
 {
-	char buf[32];
+	if (!databuf)
+	{
+		LOG("invalid data buf");
+		return;
+	}
+
+	char buf[64];
 	struct sockaddr_in si_other;
 	int s, slen=sizeof(si_other);
  	FILE* fd;
@@ -1332,7 +1338,8 @@
 	}
 
 	memset(buf, '\0', sizeof(buf));
-	sprintf(buf, "4\n%s", databuf);
+	snprintf(buf, 60, "4\n%s", databuf);
+
 	LOG("sendGuestServer msg: %s", buf);
 	if(sendto(s, buf, sizeof(buf), 0, (struct sockaddr*)&si_other, slen) == -1)
 	{     


More information about the Tizen-submit mailing list