[mapserver-commits] [MapServer/MapServer] bb9588: msDBFOpenVirtualFile(): validate field extents aga...

Naveed noreply at github.com
Fri Aug 28 14:46:47 PDT 2026


  Branch: refs/heads/backport-7571-to-branch-8-6
  Home:   https://github.com/MapServer/MapServer
  Commit: bb95881192824e50dd94b66526db26f948071e28
      https://github.com/MapServer/MapServer/commit/bb95881192824e50dd94b66526db26f948071e28
  Author: Naveed <naveed at bugqore.com>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    M CMakeLists.txt
    M src/mapxbase.c
    M tests/unit/test.cpp

  Log Message:
  -----------
  msDBFOpenVirtualFile(): validate field extents against record length

A .dbf header whose field offsets and sizes exceed the record length made msDBFReadAttribute() strncpy past the record buffer on the first attribute read. Reject such a header at open, as shapelib does.


  Commit: a0e5b3fcab21b72484bc2530eb9951382bc4cefb
      https://github.com/MapServer/MapServer/commit/a0e5b3fcab21b72484bc2530eb9951382bc4cefb
  Author: Naveed <naveed at bugqore.com>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    A msautotest/misc/data/dbf-invalid.dbf
    A msautotest/misc/data/dbf-invalid.shp
    A msautotest/misc/data/dbf-invalid.shx
    A msautotest/misc/dbf-invalid.map
    A msautotest/misc/expected/dbf-invalid-wfs-get-feature.xml

  Log Message:
  -----------
  Add msautotest case for invalid .dbf field extents

data/dbf-invalid.dbf declares a record length of 10 bytes but a single
character field of width 250. A WFS GetFeature against it must fail at
layer open instead of returning attribute bytes read past the record
buffer. Modeled on flatgeobuf-invalid.map.


Compare: https://github.com/MapServer/MapServer/compare/bb9588119282%5E...a0e5b3fcab21

To unsubscribe from these emails, change your notification settings at https://github.com/MapServer/MapServer/settings/notifications


More information about the MapServer-commits mailing list