Opened 15 years ago
Closed 15 years ago
#2976 closed defect (fixed)
[PATCH] When compiling with -Werror=format-security, we get "error: format not a string literal and no format arguments "
Reported by: | Even Rouault | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | gtiff |
Cc: |
Description
gcc -Werror=format-security fails on constructs like, printf(buffer), that may be cause crashes if buffer contains '%' characters. The correct format is printf("%s", buffer) instead.
I've detected 3 errors of that kind in GDAL itself (fix to follow), but there are remaining in internal libgeotiff and libtiff. Patches to fix those ones attached.
Attachments (2)
Change History (6)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Summary: | When compiling with -Werror=format-security, we get "error: format not a string literal and no format arguments " → [PATCH] When compiling with -Werror=format-security, we get "error: format not a string literal and no format arguments " |
---|
comment:3 by , 15 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | gtiff added |
Milestone: | → 1.7.0 |
Status: | new → assigned |
Libtiff patch applied upstream in libtiff head (for 4.0.0 release).
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Libgeotiff patched upstream (revision 1571).
libtiff and libgeotiff changes brought back into trunk (r16926).
Note:
See TracTickets
for help on using tickets.
Non libtiff and libgeotiff changes done in r16925