Skip to content

Commit

Permalink
parser: avoid character 0xff being interpreted as (int) -1
Browse files Browse the repository at this point in the history
This fixes the following CVEs:
- CVE-2021-46019
- CVE-2021-46022
- CVE-2021-46022

2022-04-16  Jose E. Marchesi  <jemarch@gnu.org>

	CVE-2021-46019
	CVE-2021-46022
	CVE-2021-46022
	* src/rec-parser.c (rec_parse_comment): Avoid 0xff being
	interpreted as (int) -1.
  • Loading branch information
jemarch committed Apr 16, 2022
1 parent da55d49 commit 34b75ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2022-04-16 Jose E. Marchesi <jemarch@gnu.org>

CVE-2021-46019
CVE-2021-46022
CVE-2021-46022
* src/rec-parser.c (rec_parse_comment): Avoid 0xff being
interpreted as (int) -1.

2022-04-16 Jose E. Marchesi <jemarch@gnu.org>

* configure.ac: Remove algol68 bindings support.
Expand Down
2 changes: 1 addition & 1 deletion src/rec-parser.c
Expand Up @@ -432,7 +432,7 @@ rec_parse_comment (rec_parser_t parser, rec_comment_t *comment)
c = '\n';
}

if (rec_buf_putc (c, buf) == EOF)
if (rec_buf_putc (ci, buf) == EOF)
{
/* Out of memory */
parser->error = REC_PARSER_ENOMEM;
Expand Down

0 comments on commit 34b75ed

Please sign in to comment.