Skip to content

Commit e1e7acb

Browse files
author
kalibera
committed
Check stack before allocation (PR#18657).
git-svn-id: https://svn.r-project.org/R/trunk@85815 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent ac4660e commit e1e7acb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/serialize.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* R : A Computer Language for Statistical Data Analysis
3-
* Copyright (C) 1995--2023 The R Core Team
3+
* Copyright (C) 1995--2024 The R Core Team
44
*
55
* This program is free software; you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -1985,6 +1985,7 @@ static SEXP ReadItem_Recursive (int flags, SEXP ref_table, R_inpstream_t stream)
19851985
{
19861986
/* These are all short strings */
19871987
length = InInteger(stream);
1988+
R_CheckStack2(length+1);
19881989
char cbuf[length+1];
19891990
InString(stream, cbuf, length);
19901991
cbuf[length] = '\0';

0 commit comments

Comments
 (0)