Blame SOURCES/gdisk-0.8.7-add-range-check.patch

43acbe
--- gptfdisk-0.8.7.old/gpt.cc	2013-07-09 03:01:09.000000000 +0100
43acbe
+++ gptfdisk-0.8.7/gpt.cc	2013-09-13 14:12:19.154495469 +0100
43acbe
@@ -1402,6 +1402,10 @@
43acbe
 
43acbe
 // Show detailed information on the specified partition
43acbe
 void GPTData::ShowPartDetails(uint32_t partNum) {
43acbe
+   if (partNum >= numParts) {
43acbe
+     cerr << "Partition number out of range\n";
43acbe
+     exit (1);
43acbe
+   }
43acbe
    if (!IsFreePartNum(partNum)) {
43acbe
       partitions[partNum].ShowDetails(blockSize);
43acbe
    } else {