Skip to content

Commit b1bf58f

Browse files
authored
Merge pull request #1235 from jan-cerny/coverity_maint-1.2
Fix 2 Coverity problems
2 parents b135e91 + fd20e52 commit b1bf58f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CVRF/cvrf_priv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,14 +512,14 @@ struct cvrf_vulnerability *cvrf_vulnerability_clone(const struct cvrf_vulnerabil
512512
}
513513

514514
int cvrf_vulnerability_filter_by_product(struct cvrf_vulnerability *vuln, const char *prod) {
515-
struct oscap_stringlist *filtered_ids = oscap_stringlist_new();
516515
int ret = 0;
517516

518517
struct cvrf_product_status_iterator *statuses = cvrf_vulnerability_get_product_statuses(vuln);
519518
while (cvrf_product_status_iterator_has_more(statuses)) {
520519
struct cvrf_product_status *stat = cvrf_product_status_iterator_next(statuses);
521520

522521
struct oscap_string_iterator *products = cvrf_product_status_get_ids(stat);
522+
struct oscap_stringlist *filtered_ids = oscap_stringlist_new();
523523
while (oscap_string_iterator_has_more(products)) {
524524
const char *product_id = oscap_string_iterator_next(products);
525525
if (oscap_str_startswith(product_id, prod))

src/OVAL/probes/unix/linux/iflisteners.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static int get_interface(const int ent_ifindex, struct interface_t *interface) {
353353
*(interface->hw_address) = '\0';
354354
}
355355
else {
356-
if (fscanf(fd, "%s\n", buf) < 1)
356+
if (fscanf(fd, "%254s\n", buf) < 1)
357357
*buf = '\0';
358358

359359
snprintf(interface->hw_address, sizeof interface->hw_address, "%s", buf);

0 commit comments

Comments
 (0)