X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debian%2Fpatches%2Ffix_header_char_cast;fp=debian%2Fpatches%2Ffix_header_char_cast;h=2ec413e15e75a6b517cac4a773809ae2d71eeec9;hb=f01e810ec85d4b9927890c7541463bb6612a4cf8;hp=0000000000000000000000000000000000000000;hpb=bba8e08d335a3c0eb8e0308cc471237921c0f92b;p=deb_pkgs%2Fspamass-milter.git diff --git a/debian/patches/fix_header_char_cast b/debian/patches/fix_header_char_cast new file mode 100644 index 0000000..2ec413e --- /dev/null +++ b/debian/patches/fix_header_char_cast @@ -0,0 +1,32 @@ +Index: spamass-milter/spamass-milter.cpp +=================================================================== +--- spamass-milter.orig/spamass-milter.cpp 2012-06-21 13:02:08.000000000 -0700 ++++ spamass-milter/spamass-milter.cpp 2012-06-21 13:02:15.000000000 -0700 +@@ -363,7 +363,7 @@ + // }}} + + /* Update a header if SA changes it, or add it if it is new. */ +-void update_or_insert(SpamAssassin* assassin, SMFICTX* ctx, string oldstring, t_setter setter, char *header ) ++void update_or_insert(SpamAssassin* assassin, SMFICTX* ctx, string oldstring, t_setter setter, const char *header ) + { + string::size_type eoh1 = assassin->d().find("\n\n"); + string::size_type eoh2 = assassin->d().find("\n\r\n"); +@@ -386,15 +386,16 @@ + { + /* change if old one was present, append if non-null */ + char* cstr = const_cast(newstring.c_str()); ++ char* hstr = const_cast(header); + if (oldsize > 0) + { + debug(D_UORI, "u_or_i: changing"); +- smfi_chgheader(ctx, header, 1, newstring.size() > 0 ? ++ smfi_chgheader(ctx, hstr, 1, newstring.size() > 0 ? + cstr : NULL ); + } else if (newstring.size() > 0) + { + debug(D_UORI, "u_or_i: inserting"); +- smfi_addheader(ctx, header, cstr); ++ smfi_addheader(ctx, hstr, cstr); + } + } else + {