Opened 10 years ago

Closed 10 years ago

#5633 closed defect (fixed)

VFK: fix DKATUZE duplication

Reported by: martinl Owned by: martinl
Priority: normal Milestone: 1.11.1
Component: OGR_SF Version: 1.11.0
Severity: normal Keywords: vfk
Cc:

Description

In VFK format data records DKATUZE can be duplicated, the first record is part of a header, the second is part of data blocks section. This issue was fixed r27621 (trunk) and should be backported to 1.11 branch, see attachment:vfk_dkatuze.diff.

Attachments (1)

vfk_dkatuze.diff (3.7 KB ) - added by martinl 10 years ago.
DKATUZE duplication

Download all attachments as: .zip

Change History (5)

by martinl, 10 years ago

Attachment: vfk_dkatuze.diff added

DKATUZE duplication

comment:1 by martinl, 10 years ago

Based on the VFK documentation there can be more data records which can appear in the header section. VFK driver must process them as a metadata, some of them can be duplicated, this issue was already fixed in trunk (r27625) and should be backported to 1.11 branch.

comment:2 by Even Rouault, 10 years ago

"pszKeyUniq = (char *) CPLMalloc(strlen(pszKey) + 4); " --> if the formatting is "%s_%d" with %s being pszKey and %d up to 3 digits (102), then the malloc should be with one extra byte to accomodate for the null terminator.

It would be perhaps interesting to extend the autotest suite with that case.

in reply to:  2 comment:3 by martinl, 10 years ago

Replying to rouault:

"pszKeyUniq = (char *) CPLMalloc(strlen(pszKey) + 4); " --> if the formatting is "%s_%d" with %s being pszKey and %d up to 3 digits (102), then the malloc should be with one extra byte to accomodate for the null terminator.

right, I forgot to increase number of allocated bytes after adding the underscore character, hopefully fixed in r27628

comment:4 by martinl, 10 years ago

Resolution: fixed
Status: newclosed

Backported to 1.11 branch as r27645. Closing this ticket.

Note: See TracTickets for help on using tickets.