Bug 10025 - (int-165685) alarmd 1.1.13 does not correctly replace [COOKIE] in exec strings
(int-165685)
: alarmd 1.1.13 does not correctly replace [COOKIE] in exec strings
Status: UNCONFIRMED
Product: System software
general
: 5.0/(3.2010.02-8)
: All Maemo
: Unspecified normal (vote)
: ---
Assigned To: unassigned
: system-software-general-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-04-24 15:30 UTC by michael+maemo
Modified: 2012-01-21 21:29 UTC (History)
1 user (show)

See Also:


Attachments


Note

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


Description michael+maemo (reporter) 2010-04-24 15:30:57 UTC
When using an alarm with the following code:

        action->flags |= ALARM_ACTION_WHEN_TRIGGERED;
        action->flags |= ALARM_ACTION_TYPE_EXEC;
        action->flags |= ALARM_ACTION_EXEC_ADD_COOKIE;
        alarm_action_set_exec_command(action, "/usr/bin/ui-alarm -c [COOKIE]
-d");

The application gets called with wrong arguments. This is due to a wrong format
string in src/server.c:server_action_do_exec(), line 1253:
      asprintf(&tmp, "%*s%d%s",
               (int)(hit-cmd), cmd,
               (int)event->ALARMD_PRIVATE(cookie),
               hit + sizeof tag - 1);
The correct version is:
      asprintf(&tmp, "%.*s%d%s",
               (int)(hit-cmd), cmd,
               (int)event->ALARMD_PRIVATE(cookie),
               hit + sizeof tag - 1);
Please fix this minor bug for the next release.
Comment 1 Andre Klapper maemo.org 2010-04-26 13:36:39 UTC
Hi Michael, thanks for reporting this!
Comment 2 Andre Klapper maemo.org 2010-06-21 12:39:29 UTC
Very unlikely that this will get fixed for the next release according to Nokia
management.
Comment 3 michael+maemo (reporter) 2010-06-21 13:41:40 UTC
How comes? What’s the reasoning for that?
Comment 4 Andre Klapper maemo.org 2010-06-21 13:50:29 UTC
I was no reason given. Please contact Nokia.
Comment 5 michael+maemo (reporter) 2010-06-23 01:20:44 UTC
Sorry that I have to ask again: Does "This will not get fixed in the next
release" mean that it will instead get fixed in the release after that one? Or
does it mean that Nokia does not care at all about fixing such a *minor* bug
like one missing dot in a format string?
Comment 6 Andre Klapper maemo.org 2010-06-23 13:20:36 UTC
(In reply to comment #5)
> Sorry that I have to ask again: Does "This will not get fixed in the next
> release" mean that it will instead get fixed in the release after that one?

I don't know. All I know from internal Nokia comments is that it won't be in
the next public release. I am not aware of Nokia's *general* plans on Maemo
updates as that's up to Nokia. And that's annoying, I know. :-/
Comment 7 Andre Klapper maemo.org 2012-01-21 21:29:43 UTC
Cloned for the CSSU project as bug 12560.