]> code.citadel.org Git - citadel.git/blobdiff - webcit/inetconf.c
fix source so that '-Wformat -Werror=format-security' doesn't stop us from compiling
[citadel.git] / webcit / inetconf.c
index d29594c1f2aa32d24751885595809625b1ac7ce5..b4470a7b2257eddf8d369acfda36a4e6c52eee74 100644 (file)
@@ -12,6 +12,7 @@ typedef enum _e_cfg {
        ic_localhost,
        ic_directory,
        ic_smarthost,
+       ic_fallback,
        ic_rbl,
        ic_spamass,
        ic_masq,
@@ -31,6 +32,7 @@ ConstStrBuf CfgNames[] = {
        { HKEY("localhost") },
        { HKEY("directory") },
        { HKEY("smarthost") },
+       { HKEY("fallbackhost") },
        { HKEY("rbl") },
        { HKEY("spamassassin") },
        { HKEY("masqdomain") },
@@ -67,7 +69,10 @@ void load_inetconf(void)
        if (GetServerStatus(Buf, NULL) == 1) {
                CfgToken = NewStrBuf();
                while ((len = StrBuf_ServGetln(Buf),
-                       strcmp(ChrPtr(Buf), "000"))) {
+                       ((len >= 0) && 
+                        ((len != 3) ||
+                         strcmp(ChrPtr(Buf), "000")))))
+               {
                        Value = NewStrBuf();
  
                        StrBufExtract_token(CfgToken, Buf, 1, '|');
@@ -204,7 +209,7 @@ HashList *GetInetConfHash(StrBuf *Target, WCTemplputParams *TP)
        if (WCC->InetCfg == NULL)
                load_inetconf();
        GetHash(WCC->InetCfg, TKEY(5), &vHash);
-       svprintf(HKEY("SERVCFG:INET:TYPE"), WCS_STRING, TP->Tokens->Params[5]->Start);
+       svprintf(HKEY("SERVCFG:INET:TYPE"), WCS_STRING, "%s", TP->Tokens->Params[5]->Start);
        return vHash;
 }