Skip to content

Commit 2647053

Browse files
1a1a11aCopilot
andauthored
Update libCacheSim/cache/eviction/plugin_cache.c
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8e86775 commit 2647053

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

libCacheSim/cache/eviction/plugin_cache.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ static void pluginCache_parse_params(cache_t *cache,
371371
char *key = strsep((char **)&params_str, "=");
372372
char *value = strsep((char **)&params_str, ",");
373373

374+
// Check if value is NULL
375+
if (value == NULL) {
376+
ERROR("Parameter '%s' is missing a value in cache '%s'\n", key, cache->cache_name);
377+
exit(1);
378+
}
374379
// Skip whitespace
375380
while (params_str != NULL && *params_str == ' ') {
376381
params_str++;

0 commit comments

Comments
 (0)