diff options
| -rw-r--r-- | meta/classes/cve-check.bbclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 537659df12..4d998388b4 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
| @@ -146,15 +146,17 @@ def get_patches_cves(d): | |||
| 146 | with open(patch_file, "r", encoding="iso8859-1") as f: | 146 | with open(patch_file, "r", encoding="iso8859-1") as f: |
| 147 | patch_text = f.read() | 147 | patch_text = f.read() |
| 148 | 148 | ||
| 149 | # Search for the "CVE: " line | 149 | # Search for one or more "CVE: " lines |
| 150 | match = cve_match.search(patch_text) | 150 | text_match = False |
| 151 | if match: | 151 | for match in cve_match.finditer(patch_text): |
| 152 | # Get only the CVEs without the "CVE: " tag | 152 | # Get only the CVEs without the "CVE: " tag |
| 153 | cves = patch_text[match.start()+5:match.end()] | 153 | cves = patch_text[match.start()+5:match.end()] |
| 154 | for cve in cves.split(): | 154 | for cve in cves.split(): |
| 155 | bb.debug(2, "Patch %s solves %s" % (patch_file, cve)) | 155 | bb.debug(2, "Patch %s solves %s" % (patch_file, cve)) |
| 156 | patched_cves.add(cve) | 156 | patched_cves.add(cve) |
| 157 | elif not fname_match: | 157 | text_match = True |
| 158 | |||
| 159 | if not fname_match and not text_match: | ||
| 158 | bb.debug(2, "Patch %s doesn't solve CVEs" % patch_file) | 160 | bb.debug(2, "Patch %s doesn't solve CVEs" % patch_file) |
| 159 | 161 | ||
| 160 | return patched_cves | 162 | return patched_cves |
