modules/mappers/mod_rewrite.c:1434: error: INTEGER_OVERFLOW_L2
  ([0, 1023] - [0, 1023]):unsigned64.

modules/mappers/mod_rewrite.c:1423:9: <LHS trace>
1421.     apr_file_read(fpout, &c, &nbytes);
1422.     do {
1423.         i = 0;
              ^
1424.         while (nbytes == 1 && (i < REWRITE_PRG_MAP_BUF)) {
1425.             if (c == eol[eolc]) {

modules/mappers/mod_rewrite.c:1423:9: Assignment
1421.     apr_file_read(fpout, &c, &nbytes);
1422.     do {
1423.         i = 0;
              ^
1424.         while (nbytes == 1 && (i < REWRITE_PRG_MAP_BUF)) {
1425.             if (c == eol[eolc]) {

modules/mappers/mod_rewrite.c:1423:9: <RHS trace>
1421.     apr_file_read(fpout, &c, &nbytes);
1422.     do {
1423.         i = 0;
              ^
1424.         while (nbytes == 1 && (i < REWRITE_PRG_MAP_BUF)) {
1425.             if (c == eol[eolc]) {

modules/mappers/mod_rewrite.c:1423:9: Assignment
1421.     apr_file_read(fpout, &c, &nbytes);
1422.     do {
1423.         i = 0;
              ^
1424.         while (nbytes == 1 && (i < REWRITE_PRG_MAP_BUF)) {
1425.             if (c == eol[eolc]) {

modules/mappers/mod_rewrite.c:1434:25: Binary operation: ([0, 1023] - [0, 1023]):unsigned64
1432.                     }
1433.                     else {
1434.                         i -= eolc;
                              ^
1435.                     }
1436.                     ++found_nl;

static char *lookup_map_program(request_rec *r, apr_file_t *fpin,
                                apr_file_t *fpout, char *key)
{
    char *buf;
    char c;
    apr_size_t i, nbytes, combined_len = 0;
    apr_status_t rv;
    const char *eol = APR_EOL_STR;
    apr_size_t eolc = 0;
    int found_nl = 0;
    result_list *buflist = NULL, *curbuf = NULL;
#ifndef NO_WRITEV
    struct iovec iova[2];
    apr_size_t niov;
#endif
    if (fpin == NULL || fpout == NULL || ap_strchr(key, '\n')) {
        return NULL;
    }
    if (rewrite_mapr_lock_acquire) {
        rv = apr_global_mutex_lock(rewrite_mapr_lock_acquire);
        if (rv != APR_SUCCESS) {
            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00659)
                          "apr_global_mutex_lock(rewrite_mapr_lock_acquire) "
                          "failed");
            return NULL;
        }
    }
#ifdef NO_WRITEV
    nbytes = strlen(key);
    apr_file_write(fpin, key, &nbytes);
    nbytes = 1;
    apr_file_write(fpin, "\n", &nbytes);
#else
    iova[0].iov_base = key;
    iova[0].iov_len = strlen(key);
    iova[1].iov_base = "\n";
    iova[1].iov_len = 1;
    niov = 2;
    apr_file_writev(fpin, iova, niov, &nbytes);
#endif
    buf = apr_palloc(r->pool, REWRITE_PRG_MAP_BUF + 1);
    nbytes = 1;
    apr_file_read(fpout, &c, &nbytes);
    do {
        i = 0;
        while (nbytes == 1 && (i < REWRITE_PRG_MAP_BUF)) {
            if (c == eol[eolc]) {
                if (!eol[++eolc]) {
                    --eolc;
                    if (i < eolc) {
                        curbuf->len -= eolc-i;
                        i = 0;
                    }
                    else {
                        i -= eolc;
                    }
                    ++found_nl;
                    break;
                }
            }
            else if (eolc) {
                eolc = 0;
            }
            else if (c == '\n') {
                ++found_nl;
                break;
            }
            buf[i++] = c;
            apr_file_read(fpout, &c, &nbytes);
        }
        if (buflist || (nbytes == 1 && !found_nl)) {
            if (!buflist) {
                curbuf = buflist = apr_palloc(r->pool, sizeof(*buflist));
            }
            else if (i) {
                curbuf->next = apr_palloc(r->pool, sizeof(*buflist));
                curbuf = curbuf->next;
            }
            curbuf->next = NULL;
            if (i) {
                curbuf->string = buf;
                curbuf->len = i;
                combined_len += i;
                buf = apr_palloc(r->pool, REWRITE_PRG_MAP_BUF);
            }
            if (nbytes == 1 && !found_nl) {
                continue;
            }
        }
        break;
    } while (1);
    if (buflist) {
        char *p;
        p = buf = apr_palloc(r->pool, combined_len + 1);
        while (buflist) {
            if (buflist->len) {
                memcpy(p, buflist->string, buflist->len);
                p += buflist->len;
            }
            buflist = buflist->next;
        }
        *p = '\0';
        i = combined_len;
    }
    else {
        buf[i] = '\0';
    }
    if (rewrite_mapr_lock_acquire) {
        rv = apr_global_mutex_unlock(rewrite_mapr_lock_acquire);
        if (rv != APR_SUCCESS) {
            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00660)
                          "apr_global_mutex_unlock(rewrite_mapr_lock_acquire) "
                          "failed");
            return NULL;
        }
    }
    if (i == 4 && !strcasecmp(buf, "NULL")) {
        return NULL;
    }
    return buf;
}
['static char *lookup_map_program(request_rec *r, apr_file_t *fpin,\n                                apr_file_t *fpout, char *key)\n{\n    char *buf;\n    char c;\n    apr_size_t i, nbytes, combined_len = 0;\n    apr_status_t rv;\n    const char *eol = APR_EOL_STR;\n    apr_size_t eolc = 0;\n    int found_nl = 0;\n    result_list *buflist = NULL, *curbuf = NULL;\n#ifndef NO_WRITEV\n    struct iovec iova[2];\n    apr_size_t niov;\n#endif\n    if (fpin == NULL || fpout == NULL || ap_strchr(key, \'\\n\')) {\n        return NULL;\n    }\n    if (rewrite_mapr_lock_acquire) {\n        rv = apr_global_mutex_lock(rewrite_mapr_lock_acquire);\n        if (rv != APR_SUCCESS) {\n            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00659)\n                          "apr_global_mutex_lock(rewrite_mapr_lock_acquire) "\n                          "failed");\n            return NULL;\n        }\n    }\n#ifdef NO_WRITEV\n    nbytes = strlen(key);\n    apr_file_write(fpin, key, &nbytes);\n    nbytes = 1;\n    apr_file_write(fpin, "\\n", &nbytes);\n#else\n    iova[0].iov_base = key;\n    iova[0].iov_len = strlen(key);\n    iova[1].iov_base = "\\n";\n    iova[1].iov_len = 1;\n    niov = 2;\n    apr_file_writev(fpin, iova, niov, &nbytes);\n#endif\n    buf = apr_palloc(r->pool, REWRITE_PRG_MAP_BUF + 1);\n    nbytes = 1;\n    apr_file_read(fpout, &c, &nbytes);\n    do {\n        i = 0;\n        while (nbytes == 1 && (i < REWRITE_PRG_MAP_BUF)) {\n            if (c == eol[eolc]) {\n                if (!eol[++eolc]) {\n                    --eolc;\n                    if (i < eolc) {\n                        curbuf->len -= eolc-i;\n                        i = 0;\n                    }\n                    else {\n                        i -= eolc;\n                    }\n                    ++found_nl;\n                    break;\n                }\n            }\n            else if (eolc) {\n                eolc = 0;\n            }\n            else if (c == \'\\n\') {\n                ++found_nl;\n                break;\n            }\n            buf[i++] = c;\n            apr_file_read(fpout, &c, &nbytes);\n        }\n        if (buflist || (nbytes == 1 && !found_nl)) {\n            if (!buflist) {\n                curbuf = buflist = apr_palloc(r->pool, sizeof(*buflist));\n            }\n            else if (i) {\n                curbuf->next = apr_palloc(r->pool, sizeof(*buflist));\n                curbuf = curbuf->next;\n            }\n            curbuf->next = NULL;\n            if (i) {\n                curbuf->string = buf;\n                curbuf->len = i;\n                combined_len += i;\n                buf = apr_palloc(r->pool, REWRITE_PRG_MAP_BUF);\n            }\n            if (nbytes == 1 && !found_nl) {\n                continue;\n            }\n        }\n        break;\n    } while (1);\n    if (buflist) {\n        char *p;\n        p = buf = apr_palloc(r->pool, combined_len + 1);\n        while (buflist) {\n            if (buflist->len) {\n                memcpy(p, buflist->string, buflist->len);\n                p += buflist->len;\n            }\n            buflist = buflist->next;\n        }\n        *p = \'\\0\';\n        i = combined_len;\n    }\n    else {\n        buf[i] = \'\\0\';\n    }\n    if (rewrite_mapr_lock_acquire) {\n        rv = apr_global_mutex_unlock(rewrite_mapr_lock_acquire);\n        if (rv != APR_SUCCESS) {\n            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00660)\n                          "apr_global_mutex_unlock(rewrite_mapr_lock_acquire) "\n                          "failed");\n            return NULL;\n        }\n    }\n    if (i == 4 && !strcasecmp(buf, "NULL")) {\n        return NULL;\n    }\n    return buf;\n}']