IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19552


Ignore:
Timestamp:
Sep 15, 2008, 11:23:36 AM (18 years ago)
Author:
jhoblitt
Message:

init error buffer
fix strlen() off by 1 errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/nebclient/src/nebclient.c

    r19503 r19552  
    44 * Copyright (C) 2005  Joshua Hoblitt
    55 *
    6  * $Id: nebclient.c,v 1.49 2008-09-12 00:34:11 jhoblitt Exp $
     6 * $Id: nebclient.c,v 1.50 2008-09-15 21:23:36 jhoblitt Exp $
    77 */
    88
     
    6868    server->err_buf_size = ERRBUF_SIZE;
    6969
     70    // init err buffer
     71    memset(server->err_buf, 0, server->err_buf_size);
     72
    7073    soap_init(server->soap);
     74    soap_set_namespaces(server->soap, namespaces);
    7175
    7276    return server;
     
    120124    // if URI is not NULL
    121125    if (URI) {
    122         *URI = xmalloc(strlen((char *)response.result));
     126        *URI = xmalloc(strlen((char *)response.result) + 1);
    123127        strcpy(*URI, (char *)response.result);
    124128    }
     
    223227    // if URI is not NULL
    224228    if (URI) {
    225         *URI = xmalloc(strlen((char *)response.result));
     229        *URI = xmalloc(strlen((char *)response.result) + 1);
    226230        strcpy(*URI, (char *)response.result);
    227231    }
Note: See TracChangeset for help on using the changeset viewer.