We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0283fc commit 9c54241Copy full SHA for 9c54241
sycl/source/detail/pi.cpp
@@ -686,6 +686,9 @@ DeviceBinaryImage::getProperty(const char *PropName) const {
686
687
// Returns the e_type field from an ELF image.
688
static uint16_t getELFHeaderType(const unsigned char *ImgData, size_t ImgSize) {
689
+ (void)ImgSize;
690
+ assert(ImgSize >= 18 && "Not enough bytes to have an ELF header type.");
691
+
692
bool IsBigEndian = ImgData[5] == 2;
693
if (IsBigEndian)
694
return (static_cast<uint16_t>(ImgData[16]) << 8) |
0 commit comments