~ubuntu-branches/ubuntu/saucy/curl/saucy-proposed

« back to all changes in this revision

Viewing changes to lib/memdebug.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-05-07 12:16:37 UTC
  • mfrom: (3.4.37 sid)
  • Revision ID: package-import@ubuntu.com-20130507121637-9t3i98qgsyr9dw5d
Tags: 7.30.0-1ubuntu1
* Resynchronize on Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
239
239
  return mem;
240
240
}
241
241
 
 
242
#ifdef WIN32
 
243
wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source)
 
244
{
 
245
  wchar_t *mem;
 
246
  size_t wsiz, bsiz;
 
247
 
 
248
  assert(str != NULL);
 
249
 
 
250
  if(countcheck("wcsdup", line, source))
 
251
    return NULL;
 
252
 
 
253
  wsiz = wcslen(str) + 1;
 
254
  bsiz = wsiz * sizeof(wchar_t);
 
255
 
 
256
  mem = curl_domalloc(bsiz, 0, NULL); /* NULL prevents logging */
 
257
  if(mem)
 
258
    memcpy(mem, str, bsiz);
 
259
 
 
260
  if(source)
 
261
    curl_memlog("MEM %s:%d wcsdup(%p) (%zu) = %p\n",
 
262
                source, line, str, bsiz, mem);
 
263
 
 
264
  return mem;
 
265
}
 
266
#endif
 
267
 
242
268
/* We provide a realloc() that accepts a NULL as pointer, which then
243
269
   performs a malloc(). In order to work with ares. */
244
270
void *curl_dorealloc(void *ptr, size_t wantedsize,