diff options
Diffstat (limited to 'src/lib/spd_bin.c')
-rw-r--r-- | src/lib/spd_bin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/spd_bin.c b/src/lib/spd_bin.c index 865f16cc8a..1b236b0e8f 100644 --- a/src/lib/spd_bin.c +++ b/src/lib/spd_bin.c @@ -167,8 +167,10 @@ static void spd_get_name(const uint8_t spd[], int type, const char **spd_name, s case SPD_DRAM_DDR5: case SPD_DRAM_LPDDR4: case SPD_DRAM_LPDDR4X: - *spd_name = (const char *) &spd[DDR4_SPD_PART_OFF]; - *len = DDR4_SPD_PART_LEN; + if (spd[DDR4_SPD_PART_OFF]) { + *spd_name = (const char *) &spd[DDR4_SPD_PART_OFF]; + *len = DDR4_SPD_PART_LEN; + } break; default: *len = 0; |