libtiff: tif_lzma/tif_lzw: add code comments

From 3c73bd4e3f90d7d06c5343b3ede6391bf6e4ac01 Mon Sep 17 00:00:00 2001
From: Even Rouault <[EMAIL REDACTED]>
Date: Mon, 27 May 2024 23:33:21 +0200
Subject: [PATCH] tif_lzma/tif_lzw: add code comments

---
 libtiff/tif_lzma.c | 2 ++
 libtiff/tif_webp.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/libtiff/tif_lzma.c b/libtiff/tif_lzma.c
index 1cc0f690..db1c8b68 100644
--- a/libtiff/tif_lzma.c
+++ b/libtiff/tif_lzma.c
@@ -190,6 +190,8 @@ static int LZMADecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s)
     sp->stream.avail_out = (size_t)occ;
     if ((tmsize_t)sp->stream.avail_out != occ)
     {
+        // read_error not set here as this is a usage issue that can be
+        // recovered in a following call.
         memset(op, 0, (size_t)occ);
         TIFFErrorExtR(tif, module,
                       "Liblzma cannot deal with buffers this size");
diff --git a/libtiff/tif_webp.c b/libtiff/tif_webp.c
index 986f1b09..ccffef07 100644
--- a/libtiff/tif_webp.c
+++ b/libtiff/tif_webp.c
@@ -290,6 +290,8 @@ static int TWebPDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s)
 
     if (occ % sp->sDecBuffer.u.RGBA.stride)
     {
+        // read_error not set here as this is a usage issue that can be
+        // recovered in a following call.
         memset(op, 0, (size_t)occ);
         /* Do not set read_error as could potentially be recovered */
         TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read");