~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to docs/examples/getinmemory.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-12 15:04:52 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051212150452-2ymlra67b2p7kjyy
Tags: 7.15.1-1ubuntu1
Resynchronise with Debian to get URL parser overflow fix from 7.15.1
(CVE-2005-4077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * $Id: getinmemory.c,v 1.9 2005/02/04 23:53:12 bagder Exp $
 
8
 * $Id: getinmemory.c,v 1.10 2005/10/10 20:58:18 bagder Exp $
9
9
 *
10
10
 * Example source code to show how the callback function can be used to
11
11
 * download data into a chunk of memory instead of storing it in a file.
14
14
 */
15
15
 
16
16
#include <stdio.h>
 
17
#include <stdlib.h>
 
18
#include <string.h>
17
19
 
18
20
#include <curl/curl.h>
19
21
#include <curl/types.h>
93
95
   * you're done with it, you should free() it as a nice application.
94
96
   */
95
97
 
 
98
  if(chunk.memory)
 
99
    free(chunk.memory);
 
100
 
96
101
  return 0;
97
102
}