]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] change declaration of base64tab to fix build with Intel C++
authorWilly Tarreau <w@1wt.eu>
Sun, 29 Jun 2008 15:17:38 +0000 (17:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 29 Jun 2008 15:17:38 +0000 (17:17 +0200)
I got a report that Intel C++ complains about the size of the
base64tab in base64.c. Setting it to 65 chars to allow for the
trailing zero fixes the problem.

src/base64.c

index 005c48684ae2da959ad671b5a3b2154030f51dbc..e0126225e7c02c399432755272a29a41c1734137 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Ascii to Base64 conversion as described in RFC1421.
  *
- * Copyright 2006 Willy Tarreau <w@1wt.eu>
+ * Copyright 2006-2008 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -13,7 +13,7 @@
 #include <common/base64.h>
 #include <common/config.h>
 
-const char base64tab[64]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+const char base64tab[65]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 /* Encodes <ilen> bytes from <in> to <out> for at most <olen> chars (including
  * the trailing zero). Returns the number of bytes written. No check is made