Skip to content

Commit

Permalink
ATRONIX: Copy the whole union in the series
Browse files Browse the repository at this point in the history
On 64-bit systems, "size" is 32-bit long, and the anonymous union is
64-bit long, just copying "size" in Prop_Series is not enough. Adding a
new field "all" in the union for this purpose.

This fixes a crash appending a value to a map!. Because the map! uses
"series" in the union, and Prop_Series only copies half of it (by
copying the "size" member), later access to "series" results in a
segment fault

(cherry picked from commit d7a6524)
  • Loading branch information
Oldes committed Sep 21, 2018
1 parent 2894800 commit 69edc86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/m-pools.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
***********************************************************************/
{
newser->info = oldser->info;
newser->size = oldser->size;
newser->all = oldser->all;
#ifdef SERIES_LABELS
newser->label = oldser->label;
#endif
Expand Down

0 comments on commit 69edc86

Please sign in to comment.