projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AUTORECODE: Avoid use-after-free error with TEMPORARY.
[pspp]
/
src
/
language
/
expressions
/
evaluate.c
diff --git
a/src/language/expressions/evaluate.c
b/src/language/expressions/evaluate.c
index 3df9a6c9fe70172308c3a3486f4997e5cd33244d..afb742ffeae06de29b57ba327bd85a41a753aaeb 100644
(file)
--- a/
src/language/expressions/evaluate.c
+++ b/
src/language/expressions/evaluate.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011
, 2012
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-16,7
+16,7
@@
#include <config.h>
#include <config.h>
-#include "
language/expressions/
evaluate.h"
+#include "evaluate.h"
#include <ctype.h>
#include <ctype.h>
@@
-132,7
+132,6
@@
cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED)
else if (lex_match (lexer, T_LPAREN))
{
struct variable *v;
else if (lex_match (lexer, T_LPAREN))
{
struct variable *v;
- size_t old_value_cnt;
int width;
if (!lex_force_id (lexer))
int width;
if (!lex_force_id (lexer))
@@
-155,11
+154,10
@@
cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED)
if ( ds == NULL )
{
if ( ds == NULL )
{
- ds = dataset_create ();
+ ds = dataset_create (
NULL, ""
);
d = dataset_dict (ds);
}
d = dataset_dict (ds);
}
- old_value_cnt = dict_get_next_value_idx (d);
v = dict_create_var (d, name, width);
if (v == NULL)
{
v = dict_create_var (d, name, width);
if (v == NULL)
{
@@
-174,7
+172,7
@@
cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED)
else
c = case_unshare_and_resize (c, dict_get_proto (d));
else
c = case_unshare_and_resize (c, dict_get_proto (d));
- if (!parse_value (lexer, case_data_rw (c, v), v
ar_get_width (v)
))
+ if (!parse_value (lexer, case_data_rw (c, v), v))
NOT_REACHED ();
if (!lex_force_match (lexer, T_RPAREN))
NOT_REACHED ();
if (!lex_force_match (lexer, T_RPAREN))