]> source.dussan.org Git - rspamd.git/commitdiff
Fix error on adjusting url lengths after decoding
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 7 Dec 2015 13:08:17 +0000 (13:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 7 Dec 2015 13:08:17 +0000 (13:08 +0000)
src/libserver/url.c

index 29082d3384ca9bee34e00c4071396574c909ff2d..165828cd4c02490b05223d6cbcdb8a3ed36a40b5 100644 (file)
@@ -1296,34 +1296,28 @@ rspamd_url_shift (struct rspamd_url *uri, gsize nlen,
        case UF_SCHEMA:
                if (uri->userlen > 0) {
                        uri->user -= shift;
-                       uri->userlen -= shift;
                }
                if (uri->hostlen > 0) {
                        uri->host -= shift;
-                       uri->hostlen -= shift;
                }
                /* Go forward */
        case UF_HOST:
                if (uri->datalen > 0) {
                        uri->data -= shift;
-                       uri->datalen -= shift;
                }
                /* Go forward */
        case UF_PATH:
                if (uri->querylen > 0) {
                        uri->query -= shift;
-                       uri->querylen -= shift;
                }
                /* Go forward */
        case UF_QUERY:
                if (uri->fragmentlen > 0) {
                        uri->fragment -= shift;
-                       uri->fragmentlen -= shift;
                }
                /* Go forward */
        case UF_FRAGMENT:
        default:
-               uri->urllen -= shift;
                break;
        }
 }