+@@ -290,7 +293,7 @@
+ noff = offset;
+ doff = ELF_ALIGN(offset + nh_namesz);
+
+- if (offset + nh_namesz >= size) {
++ if (offset + nh_namesz > size) {
+ /*
+ * We're past the end of the buffer.
+ */
+@@ -298,7 +301,7 @@
+ }
+
+ offset = ELF_ALIGN(doff + nh_descsz);
+- if (offset + nh_descsz >= size)
++ if (doff + nh_descsz > size)
+ return offset;
+
+ if (nh_namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
+@@ -601,7 +604,7 @@