projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix up potential overflows in size calculations by replacing
[pspp]
/
src
/
var.h
diff --git
a/src/var.h
b/src/var.h
index b4d5018208b00a25d16946a5c6b2d8b095691da5..a1059a20828a04c76d14184825a037643942e195 100644
(file)
--- a/
src/var.h
+++ b/
src/var.h
@@
-24,9
+24,9
@@
#include <stddef.h>
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "config.h"
#include <stdbool.h>
+
#include "format.h"
#include "missing-values.h"
#include "format.h"
#include "missing-values.h"
-#include "val.h"
/* Script variables. */
/* Script variables. */
@@
-195,7
+195,8
@@
size_t var_set_get_cnt (const struct var_set *vs);
struct variable *var_set_get_var (const struct var_set *vs, size_t idx);
struct variable *var_set_lookup_var (const struct var_set *vs,
const char *name);
struct variable *var_set_get_var (const struct var_set *vs, size_t idx);
struct variable *var_set_lookup_var (const struct var_set *vs,
const char *name);
-int var_set_lookup_var_idx (const struct var_set *vs, const char *name);
+bool var_set_lookup_var_idx (const struct var_set *vs, const char *name,
+ size_t *idx);
void var_set_destroy (struct var_set *vs);
\f
/* Variable parsers. */
void var_set_destroy (struct var_set *vs);
\f
/* Variable parsers. */
@@
-215,12
+216,12
@@
enum
struct variable *parse_variable (void);
struct variable *parse_dict_variable (const struct dictionary *);
struct variable *parse_variable (void);
struct variable *parse_dict_variable (const struct dictionary *);
-int parse_variables (const struct dictionary *, struct variable ***,
in
t *,
+int parse_variables (const struct dictionary *, struct variable ***,
size_
t *,
int opts);
int opts);
-int parse_var_set_vars (const struct var_set *, struct variable ***,
in
t *,
+int parse_var_set_vars (const struct var_set *, struct variable ***,
size_
t *,
int opts);
int opts);
-int parse_DATA_LIST_vars (char ***names,
in
t *cnt, int opts);
-int parse_mixed_vars (char ***names,
in
t *cnt, int opts);
+int parse_DATA_LIST_vars (char ***names,
size_
t *cnt, int opts);
+int parse_mixed_vars (char ***names,
size_
t *cnt, int opts);