modules/dav/fs/lock.c:884: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `dav_fs_load_locknull_list`.

modules/dav/fs/lock.c:875:19: Unknown value from: strrchr
873.     const char *scanend;
874.     char *dirpath = apr_pstrdup(p, filename);
875.     char *fname = strrchr(dirpath, '/');
                       ^
876.     int dirty = 0;
877. 

modules/dav/fs/lock.c:884:16: Call
882.     len = strlen(fname) + 1;
883. 
884.     if ((err = dav_fs_load_locknull_list(p, dirpath, pbuf)) != NULL) {
                    ^
885.         /* ### add a higher level description? */
886.         return err;

modules/dav/fs/lock.c:745:1: <LHS trace>
743. **    for the given directory.
744. */
745. static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath,
     ^
746.                                              dav_buffer *pbuf)
747. {

modules/dav/fs/lock.c:745:1: Parameter `dirpath->strlen`
  743. **    for the given directory.
  744. */
  745. static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath,
       ^
  746.                                              dav_buffer *pbuf)
  747. {

modules/dav/fs/lock.c:754:5: Call
  752.     apr_status_t rv;
  753. 
  754.     dav_buffer_init(p, pbuf, dirpath);
           ^
  755. 
  756.     if (pbuf->buf[pbuf->cur_len - 1] == '/')

modules/dav/main/util.c:116:1: Parameter `str->strlen`
    114. 
    115. /* initialize a buffer and copy the specified (null-term'd) string into it */
    116. DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,
         ^
    117.                                   const char *str)
    118. {

modules/dav/main/util.c:119:5: Call
    117.                                   const char *str)
    118. {
    119.     dav_set_bufsize(p, pbuf, strlen(str));
             ^
    120.     memcpy(pbuf->buf, str, pbuf->cur_len + 1);
    121. }

modules/dav/main/util.c:94:1: Parameter `size`
      92. }
      93. 
      94. DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf,
          ^
      95.                                   apr_size_t size)
      96. {

modules/dav/main/util.c:111:5: Assignment
      109.         pbuf->buf = apr_palloc(p, pbuf->alloc_len);
      110.     }
      111.     pbuf->cur_len = size;
               ^
      112. }
      113. 

modules/dav/fs/lock.c:756:9: Binary operation: ([0, +oo] - 1):unsigned64 by call to `dav_fs_load_locknull_list` 
  754.     dav_buffer_init(p, pbuf, dirpath);
  755. 
  756.     if (pbuf->buf[pbuf->cur_len - 1] == '/')
               ^
  757.         pbuf->buf[--pbuf->cur_len] = '\0';
  758. 

static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath,
                                             dav_buffer *pbuf)
{
    apr_finfo_t finfo;
    apr_file_t *file = NULL;
    dav_error *err = NULL;
    apr_size_t amt;
    apr_status_t rv;
    dav_buffer_init(p, pbuf, dirpath);
    if (pbuf->buf[pbuf->cur_len - 1] == '/')
        pbuf->buf[--pbuf->cur_len] = '\0';
    dav_buffer_place(p, pbuf, "/" DAV_FS_STATE_DIR "/" DAV_FS_LOCK_NULL_FILE);
    pbuf->cur_len = 0;
    if (apr_file_open(&file, pbuf->buf, APR_READ | APR_BINARY, APR_OS_DEFAULT,
                p) != APR_SUCCESS) {
        return NULL;
    }
    rv = apr_file_info_get(&finfo, APR_FINFO_SIZE, file);
    if (rv != APR_SUCCESS) {
        err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, rv,
                            apr_psprintf(p,
                                        "Opened but could not stat file %s",
                                        pbuf->buf));
        goto loaderror;
    }
    if (finfo.size != (apr_size_t)finfo.size) {
        err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
                            apr_psprintf(p,
                                        "Opened but rejected huge file %s",
                                        pbuf->buf));
        goto loaderror;
    }
    amt = (apr_size_t)finfo.size;
    dav_set_bufsize(p, pbuf, amt);
    if ((rv = apr_file_read(file, pbuf->buf, &amt)) != APR_SUCCESS
        || amt != finfo.size) {
        err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, rv,
                            apr_psprintf(p,
                                        "Failure reading locknull file "
                                        "for %s", dirpath));
        pbuf->cur_len = 0;
        goto loaderror;
    }
  loaderror:
    apr_file_close(file);
    return err;
}
["static dav_error * dav_fs_remove_locknull_member(apr_pool_t *p,\n                                                 const char *filename,\n                                                 dav_buffer *pbuf)\n{\n    dav_error *err;\n    apr_size_t len;\n    apr_size_t scanlen;\n    char *scan;\n    const char *scanend;\n    char *dirpath = apr_pstrdup(p, filename);\n    char *fname = strrchr(dirpath, '/');\n    int dirty = 0;\n    if (fname != NULL)\n        *fname++ = '\\0';\n    else\n        fname = dirpath;\n    len = strlen(fname) + 1;\n    if ((err = dav_fs_load_locknull_list(p, dirpath, pbuf)) != NULL) {\n        return err;\n    }\n    for (scan = pbuf->buf, scanend = scan + pbuf->cur_len;\n         scan < scanend;\n         scan += scanlen) {\n        scanlen = strlen(scan) + 1;\n        if (len == scanlen && memcmp(fname, scan, scanlen) == 0) {\n            pbuf->cur_len -= scanlen;\n            memmove(scan, scan + scanlen, scanend - (scan + scanlen));\n            dirty = 1;\n            break;\n        }\n    }\n    if (dirty) {\n        if ((err = dav_fs_save_locknull_list(p, dirpath, pbuf)) != NULL) {\n            return err;\n        }\n    }\n    return NULL;\n}", 'static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath,\n                                             dav_buffer *pbuf)\n{\n    apr_finfo_t finfo;\n    apr_file_t *file = NULL;\n    dav_error *err = NULL;\n    apr_size_t amt;\n    apr_status_t rv;\n    dav_buffer_init(p, pbuf, dirpath);\n    if (pbuf->buf[pbuf->cur_len - 1] == \'/\')\n        pbuf->buf[--pbuf->cur_len] = \'\\0\';\n    dav_buffer_place(p, pbuf, "/" DAV_FS_STATE_DIR "/" DAV_FS_LOCK_NULL_FILE);\n    pbuf->cur_len = 0;\n    if (apr_file_open(&file, pbuf->buf, APR_READ | APR_BINARY, APR_OS_DEFAULT,\n                p) != APR_SUCCESS) {\n        return NULL;\n    }\n    rv = apr_file_info_get(&finfo, APR_FINFO_SIZE, file);\n    if (rv != APR_SUCCESS) {\n        err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, rv,\n                            apr_psprintf(p,\n                                        "Opened but could not stat file %s",\n                                        pbuf->buf));\n        goto loaderror;\n    }\n    if (finfo.size != (apr_size_t)finfo.size) {\n        err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, 0,\n                            apr_psprintf(p,\n                                        "Opened but rejected huge file %s",\n                                        pbuf->buf));\n        goto loaderror;\n    }\n    amt = (apr_size_t)finfo.size;\n    dav_set_bufsize(p, pbuf, amt);\n    if ((rv = apr_file_read(file, pbuf->buf, &amt)) != APR_SUCCESS\n        || amt != finfo.size) {\n        err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, rv,\n                            apr_psprintf(p,\n                                        "Failure reading locknull file "\n                                        "for %s", dirpath));\n        pbuf->cur_len = 0;\n        goto loaderror;\n    }\n  loaderror:\n    apr_file_close(file);\n    return err;\n}', 'DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,\n                                  const char *str)\n{\n    dav_set_bufsize(p, pbuf, strlen(str));\n    memcpy(pbuf->buf, str, pbuf->cur_len + 1);\n}', 'DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf,\n                                  apr_size_t size)\n{\n    if (size + DAV_BUFFER_PAD > pbuf->alloc_len) {\n        pbuf->alloc_len = size + DAV_BUFFER_PAD;\n        if (pbuf->alloc_len < DAV_BUFFER_MINSIZE)\n            pbuf->alloc_len = DAV_BUFFER_MINSIZE;\n        pbuf->buf = apr_palloc(p, pbuf->alloc_len);\n    }\n    pbuf->cur_len = size;\n}']