diff options
| author | Andreas Politz <politza@hochschule-trier.de> | 2015-02-04 19:48:48 +0100 |
|---|---|---|
| committer | Andreas Politz <politza@hochschule-trier.de> | 2015-02-04 19:48:48 +0100 |
| commit | 067ccfe286df5cc1516ffbf7a40f710d2c54175c (patch) | |
| tree | a30a36356f48ecdc65dcdaaf37ab1cdf7ed09dc5 | |
| parent | 637fdbcdb490bd1279b3b5f73dc81e8f3ee252bb (diff) | |
Fix bugs.
* server/epdfinfo.c (command_arg_split): Alloc space for the 0.
(cmd_getselection): Use correct index.
| -rw-r--r-- | server/epdfinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/epdfinfo.c b/server/epdfinfo.c index b15930f..d412ee9 100644 --- a/server/epdfinfo.c +++ b/server/epdfinfo.c @@ -651,7 +651,7 @@ command_arg_split (const char *args, int *nargs) if (! args) goto theend; - buffer = g_malloc (strlen (args)); + buffer = g_malloc (strlen (args) + 1); while (*args || last) { @@ -2127,7 +2127,7 @@ cmd_getselection (const epdfinfo_t *ctx, const command_arg_t *args) PopplerDocument *doc = args[0].value.doc->pdf; int pn = args[1].value.natnum; PopplerRectangle r = args[2].value.rectangle; - int selection_style = args[5].value.natnum; + int selection_style = args[3].value.natnum; gdouble width, height; cairo_region_t *region = NULL; PopplerPage *page = NULL; |
