X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fpfm-read.c;h=766e214063d26f72aa6ead2e98eac7158186338a;hb=1195caf0c998e80d3e7195a0452a14e7b4194077;hp=52e32325ff450c6259bc37cba15fd28bdeaa45e8;hpb=6d22bfb099969c0d443623aa5b5c9edc4747ce5e;p=pspp-builds.git diff --git a/src/pfm-read.c b/src/pfm-read.c index 52e32325..766e2140 100644 --- a/src/pfm-read.c +++ b/src/pfm-read.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include #include "pfm-read.h" @@ -396,8 +396,11 @@ read_header (struct pfm_reader *r) /* Skip and verify signature. */ for (i = 0; i < 8; i++) - if (!match (r, "SPSSPORT"[i])) - error (r, _("Missing SPSSPORT signature.")); + if (!match (r, "SPSSPORT"[i])) + { + msg (SE, _("%s: Not a portable file."), handle_get_filename (r->fh)); + longjmp (r->bail_out, 1); + } } /* Reads the version and date info record, as well as product and @@ -494,7 +497,7 @@ read_variables (struct pfm_reader *r, struct dictionary *dict) if (match (r, '6')) { weight_name = read_pool_string (r); - if (strlen (weight_name) > 8) + if (strlen (weight_name) > SHORT_NAME_LEN) error (r, _("Weight variable name (%s) truncated."), weight_name); } @@ -518,7 +521,7 @@ read_variables (struct pfm_reader *r, struct dictionary *dict) for (j = 0; j < 6; j++) fmt[j] = read_int (r); - if (!var_is_valid_name (name, false) || *name == '#') + if (!var_is_valid_name (name, false) || *name == '#' || *name == '$') error (r, _("position %d: Invalid variable name `%s'."), name); st_uppercase (name);