diff --git a/.github/codeql.yml b/.github/codeql.yml index 0ea446a..fb2bfa8 100644 --- a/.github/codeql.yml +++ b/.github/codeql.yml @@ -1,7 +1,22 @@ paths-ignore: - - 'test*.c' + - 'test**.c' query-filters: - exclude: id: cpp/commented-out-code - + - exclude: + id: cpp/toctou-race-condition + - exclude: + id: cpp/weak-cryptographic-algorithm + - exclude: + id: cpp/world-writable-file-creation + - exclude: + id: cpp/uncontrolled-allocation-size + - exclude: + id: cpp/path-injection + - exclude: + id: cpp/stack-address-escape + - exclude: + id: cpp/loop-variable-changed + - exclude: + id: cpp/long-switch diff --git a/.lgtm.yml b/.lgtm.yml deleted file mode 100644 index fd4a11f..0000000 --- a/.lgtm.yml +++ /dev/null @@ -1,2 +0,0 @@ -queries: - - exclude: cpp/toctou-race-condition diff --git a/ttf.c b/ttf.c index 0517565..9e8e8a5 100644 --- a/ttf.c +++ b/ttf.c @@ -420,7 +420,7 @@ ttfCreate(const char *filename, // I - Filename if (read_os_2(font, &os_2)) { // Copy key values from OS/2 table... - static const ttf_stretch_t widths[] = + static const ttf_stretch_t stretches[] = { TTF_STRETCH_ULTRA_CONDENSED, // ultra-condensed TTF_STRETCH_EXTRA_CONDENSED, // extra-condensed @@ -433,8 +433,8 @@ ttfCreate(const char *filename, // I - Filename TTF_STRETCH_ULTRA_EXPANDED // ultra-expanded }; - if (os_2.usWidthClass >= 1 && os_2.usWidthClass <= (int)(sizeof(widths) / sizeof(widths[0]))) - font->stretch = widths[os_2.usWidthClass - 1]; + if (os_2.usWidthClass >= 1 && os_2.usWidthClass <= (int)(sizeof(stretches) / sizeof(stretches[0]))) + font->stretch = stretches[os_2.usWidthClass - 1]; font->weight = (short)os_2.usWeightClass; font->cap_height = os_2.sCapHeight;