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

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


  Branch: refs/heads/main
  Home:   https://github.com/MapServer/MapServer
  Commit: bf7196ff126491ac5c3c980a9ee4872ff4421a46
      https://github.com/MapServer/MapServer/commit/bf7196ff126491ac5c3c980a9ee4872ff4421a46
  Author: Naveed <naveed at bugqore.com>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    M CMakeLists.txt
    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
    M src/mapxbase.c
    M tests/unit/test.cpp

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

* 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.

* 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.



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