Bug 16330 - foreign package: memory protection error (trivial to fix)
Summary: foreign package: memory protection error (trivial to fix)
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Add-ons (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-04-23 10:53 UTC by Tomas Kalibera
Modified: 2017-03-06 11:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Kalibera 2015-04-23 10:53:41 UTC
In src/spss.c in read_SPSS_SAVE around line 573

setAttrib(ans, install("codepage"), ScalarInteger(inf.encoding));

The scalar integer box for inf.encoding is unprotected - it may be killed by install if install gets called after ScalarInteger.

Possible fix - create the symbol fist, e.g. s_codepage = install("codepage") and then call setAttrib(ans, s_codepage, ScalarInteger(inf.encoding));
Comment 1 Tomas Kalibera 2017-03-06 11:05:01 UTC
Fixed 2015-08-18.