diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-09-19 16:53:10 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-09-19 16:53:10 +0000 |
| commit | af7ebd96a0bcf19d4b5af0eb92f2ac88edc5db55 (patch) | |
| tree | 4f2615ad72d4b08bf442c2ce1d317058ec4e1d29 /applications/codec | |
| parent | ac59fd14767291da8cb2905903928da2f8392b21 (diff) | |
Enhance some new JPIP files about opj_config inclusion and using of free/calloc (credit to Julien Malik)
Diffstat (limited to 'applications/codec')
| -rw-r--r-- | applications/codec/j2k_dump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/applications/codec/j2k_dump.c b/applications/codec/j2k_dump.c index be5e1d63..b33d24cf 100644 --- a/applications/codec/j2k_dump.c +++ b/applications/codec/j2k_dump.c @@ -260,11 +260,11 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i case 'd': /* Input decode ROI */ { - int size_optarg = (int)strlen(optarg) + 1; + int size_optarg = (int)strlen(opj_optarg) + 1; char *ROI_values = (char*) malloc(size_optarg); ROI_values[0] = '\0'; - strncpy(ROI_values, optarg, strlen(optarg)); - ROI_values[strlen(optarg)] = '\0'; + strncpy(ROI_values, opj_optarg, strlen(opj_optarg)); + ROI_values[strlen(opj_optarg)] = '\0'; /*printf("ROI_values = %s [%d / %d]\n", ROI_values, strlen(ROI_values), size_optarg ); */ parse_ROI_values( ROI_values, ¶meters->ROI_x0, ¶meters->ROI_y0, ¶meters->ROI_x1, ¶meters->ROI_y1); } |
