{
  "id": "bugs/c/libtiff__libtiff/2026-11-20-predictor-encode-tile-return-value",
  "title": "PredictorEncodeTile ignores the differencing routine's return value",
  "category": "bugs",
  "type": "logic-bug",
  "severity": "low",
  "cvss": null,
  "ecosystem": "c",
  "project": {
    "owner": "libtiff",
    "repo": "libtiff",
    "url": "https://gitlab.com/libtiff/libtiff"
  },
  "affected_versions": [
    "master before merge request 1052"
  ],
  "status": "fixed",
  "disclosure": {
    "channel": "pr",
    "ghsa_id": null,
    "cve_id": null,
    "url": "https://gitlab.com/libtiff/libtiff/-/merge_requests/1033",
    "reported_at": "2026-11-20T20:20:47+03:00",
    "published_at": "2026-11-20T20:20:47+03:00"
  },
  "summary": "PredictorEncodeTile() did not check the return value of the per-row differencing routine. PredictorEncodeRow() and PredictorDecodeTile() both check it. The routine can fail, for example when fpDiff() cannot allocate its temporary row buffer. The tile was still passed to the encoder, and TIFFWriteEncodedTile() reported success, although the written samples were not differenced, or only partly differenced, and do not read back as the original samples. Merge request 1033, opened by ucsurf, was folded into merge request 1052. Roger Leigh merged 1052 on 2026-11-30 (f895b1d). Commits 40c03e69 and cc0767d1, both authored by ucsurf Security, are on master.",
  "discovered_at": "2026-11-20T20:19:27+03:00",
  "public": true,
  "credit": "ucsurf",
  "updated_at": "2026-11-30T10:30:00+03:00",
  "pr": {
    "url": "https://gitlab.com/libtiff/libtiff/-/merge_requests/1052",
    "state": "merged",
    "merged_at": "2026-11-30T00:16:00+03:00",
    "number": 1052
  },
  "references": [
    "https://gitlab.com/libtiff/libtiff/-/merge_requests/1033",
    "https://gitlab.com/libtiff/libtiff/-/commit/40c03e69921a9e7e60df2d385777d1d6d8cee2d6",
    "https://gitlab.com/libtiff/libtiff/-/commit/cc0767d155fecb8951802b3167c5ae28af24e5c6",
    "https://gitlab.com/libtiff/libtiff/-/commit/f895b1d90963f81a28fe70e9fda7f5aa4a8b74d4"
  ]
}
