gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23236 - libmicrohttpd/doc/examples


From: gnunet
Subject: [GNUnet-SVN] r23236 - libmicrohttpd/doc/examples
Date: Tue, 14 Aug 2012 20:37:27 +0200

Author: grothoff
Date: 2012-08-14 20:37:27 +0200 (Tue, 14 Aug 2012)
New Revision: 23236

Modified:
   libmicrohttpd/doc/examples/largepost.c
Log:
need to use must copy, as page is on the stack

Modified: libmicrohttpd/doc/examples/largepost.c
===================================================================
--- libmicrohttpd/doc/examples/largepost.c      2012-08-14 17:16:38 UTC (rev 
23235)
+++ libmicrohttpd/doc/examples/largepost.c      2012-08-14 18:37:27 UTC (rev 
23236)
@@ -55,7 +55,7 @@
 
   response =
     MHD_create_response_from_buffer (strlen (page), (void *) page,
-                                    MHD_RESPMEM_PERSISTENT);
+                                    MHD_RESPMEM_MUST_COPY);
   if (!response)
     return MHD_NO;
   MHD_add_response_header (response, MHD_HTTP_HEADER_CONTENT_TYPE, 
"text/html");
@@ -183,7 +183,7 @@
     {
       char buffer[1024];
 
-      sprintf (buffer, askpage, nr_of_uploading_clients);
+      snprintf (buffer, sizeof (buffer), askpage, nr_of_uploading_clients);
       return send_page (connection, buffer, MHD_HTTP_OK);
     }
 




reply via email to

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