Code

Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455)
[nagiosplug.git] / lib / tests / test_base64.c
index e3ed2bddb09c971d44b03a69fc9bfdfc794c2d61..5103d10df64f871c824261df323acba6bb8f1c3e 100644 (file)
@@ -1,25 +1,23 @@
-/******************************************************************************
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-******************************************************************************/
+/*****************************************************************************
+* 
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
+* 
+* 
+*****************************************************************************/
 
 #include "common.h"
-#include "base64.h"
+#include "gl/base64.h"
 #include "tap.h"
 
 int
@@ -341,7 +339,7 @@ main (int argc, char **argv)
 
        plan_tests(1);
 
-       b64_test = base64 (random, 1024);
+       base64_encode_alloc (random, 1024, &b64_test);
 
        ok(strcmp(b64_known, b64_test) == 0,
           "Test matching a base64 encoded 1024 bytes random string");