bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mailutils] [PATCH] fixes for comsatd


From: Damon Harper
Subject: [bug-mailutils] [PATCH] fixes for comsatd
Date: Fri, 25 Aug 2006 15:31:05 -0700
User-agent: Mutt/1.4.2.2i

hi there -

i noticed an oversight in the comsat code.  when
expand_line/expand_escape inserted the value of any header or body
line with double quotes in it, mu_argcv_get would then misinterpret
the string tokenisation.  for instance, if parsing a %H{From} when the
>From header contains `"My Name" <address@hidden>', we have:

1. echo "%H{From}"

-> 2. echo ""My Name" <address@hidden>"

-> 3. echo, My, Name <address@hidden>

then action_echo just echoes argv[1] which is `My'; i.e. the action is
truncated unexpectedly.

the attached patch fixes this by calling mu_argcv_get FIRST, then
parsing each argv with expand_line to catch the escape sequences.

i also noticed that mu_argcv_free was only called in run_user_action
when there was an error parsing the arguments; otherwise each action's
argv strings stay in memory.  this is not a big deal since the program
exits after running the action, but on the other hand it doesn't
really look good either, so the patch also makes sure to call
mu_argcv_free wherever appropriate.

hope this helps!

-damon

Attachment: mailutils-1.0-comsatd-escape-fix-0.1.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]