summaryrefslogtreecommitdiffstats
path: root/external/expat/ubsan.patch.0
blob: 8317f922df88fc591e2862f6d68513c7128dfbb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- lib/xmlparse.c
+++ lib/xmlparse.c
@@ -6485,7 +6485,7 @@
 static void FASTCALL
 hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
   iter->p = table->v;
-  iter->end = iter->p + table->size;
+  iter->end = table->size == 0 ? iter->p : iter->p + table->size;
 }
 
 static NAMED *FASTCALL