Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
dovecot22.24960
0001-lib-mail-rfc822-parser-Add-asserts-to-make...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-lib-mail-rfc822-parser-Add-asserts-to-make-sure-pars.patch of Package dovecot22.24960
From 30dc856f7b97b75b0e0d69f5003d5d99a13249b4 Mon Sep 17 00:00:00 2001 From: Timo Sirainen <timo.sirainen@dovecot.fi> Date: Fri, 22 Dec 2017 18:31:52 +0200 Subject: [PATCH 1/7] lib-mail: rfc822-parser - Add asserts to make sure parser state is correct --- src/lib-mail/rfc822-parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib-mail/rfc822-parser.c b/src/lib-mail/rfc822-parser.c index 6dd2254..edb07f5 100644 --- a/src/lib-mail/rfc822-parser.c +++ b/src/lib-mail/rfc822-parser.c @@ -211,6 +211,7 @@ int rfc822_parse_quoted_string(struct rfc822_parser_context *ctx, string_t *str) const unsigned char *start; size_t len; + i_assert(ctx->data < ctx->end); i_assert(*ctx->data == '"'); ctx->data++; @@ -313,6 +314,7 @@ rfc822_parse_domain_literal(struct rfc822_parser_context *ctx, string_t *str) %d94-126 ; characters not including "[", ; "]", or "\" */ + i_assert(ctx->data < ctx->end); i_assert(*ctx->data == '['); for (start = ctx->data; ctx->data != ctx->end; ctx->data++) { @@ -338,6 +340,7 @@ int rfc822_parse_domain(struct rfc822_parser_context *ctx, string_t *str) domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] obs-domain = atom *("." atom) */ + i_assert(ctx->data < ctx->end); i_assert(*ctx->data == '@'); ctx->data++; -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor