Flag error in tag container for non-extension tag retrieval
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Feb 2012 12:14:09 +0000 (14:14 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Feb 2012 12:14:09 +0000 (14:14 +0200)
- This should mostly be a can't happen case, but at least in theory
  region retrieval could fail. So could unknown data type, but a header
  with unknown data types shouldn't even load... Anyway, there could
  be further error cases we might be able to flag here.

lib/header.c

index d0c9b71..d741552 100644 (file)
@@ -1310,6 +1310,9 @@ static int intGetTdEntry(Header h, rpmtd td, headerGetFlags flags)
        }
     }
 
+    if (rc == 0)
+       td->flags |= RPMTD_INVALID;
+
     /* XXX 1 on success */
     return ((rc == 1) ? 1 : 0);
 }