Bug 12560 - alarmd does not correctly replace [COOKIE] in exec strings
: alarmd does not correctly replace [COOKIE] in exec strings
Status: RESOLVED FIXED
Product: Maemo 5 Community SSU
general
: testing
: All Maemo
: Unspecified normal (vote)
: ---
Assigned To: unassigned
: general
:
: patch
:
:
  Show dependency tree
 
Reported: 2012-01-21 21:29 UTC by Andre Klapper
Modified: 2012-04-07 20:03 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Andre Klapper (reporter) maemo.org 2012-01-21 21:29:24 UTC
Cloning from bug 10025 as the fix is a one-liner in an open source package and
could be shipped by the Maemo 5 CSSU community updates project.

SOFTWARE VERSION:
21.2011.38-1Tmaemo1.2 (17.01.2012)
http://repository.maemo.org/pool/fremantle/free/a/alarmd/alarmd_1.1.16+0m5.tar.gz
as officially shipped

EXACT STEPS LEADING TO PROBLEM:
See bug 10025

EXPECTED OUTCOME:

--- src/server.c.orig
+++ src/server.c
@@ -1257,7 +1257,7 @@ 
   {
     if( (hit = strstr(cmd, tag)) != 0 )
     {
-      asprintf(&tmp, "%*s%d%s",
+      asprintf(&tmp, "%.*s%d%s",
                (int)(hit-cmd), cmd,
                (int)event->ALARMD_PRIVATE(cookie),
                hit + sizeof tag - 1);
Comment 1 Christian Ratzenhofer 2012-04-07 20:03:45 UTC
This has been fixed for the Community SSU Updates in package
alarmd (1.1.16+0m5+0cssu0)
which is part of the build version
21.2011.38-1Tmaemo3
(Note: 21.2011.38-1 is the latest official Nokia version.
The number after it indicates the Community SSU release version.)

Commit:
https://gitorious.org/community-ssu/alarmd/commit/a58fc206198b8ecda3847db625eea93ab845b930

For more information about Community SSU please see
http://wiki.maemo.org/Community_SSU