[HarfBuzz] harfbuzz: Branch 'master' - 2 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Feb 18 19:55:54 UTC 2018
.travis.yml | 5 ++---
test/api/hb-subset-test.h | 17 +++++++++++------
2 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit 0bd2d76bdd83569366762416bf7c8fd8e90021aa
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Feb 18 11:55:26 2018 -0800
[test] Fix a couple of coverity_scan issues
diff --git a/test/api/hb-subset-test.h b/test/api/hb-subset-test.h
index 49e5db48..31f5145f 100644
--- a/test/api/hb-subset-test.h
+++ b/test/api/hb-subset-test.h
@@ -40,18 +40,23 @@ hb_subset_test_read_file (const char *path,
{
FILE *fp = fopen (path, "rb");
- size_t file_length = 0;
+ long file_length = 0;
char *buffer = NULL;
- if (fp && fseek (fp, 0, SEEK_END) == 0) {
+ if (fp && fseek (fp, 0, SEEK_END) == 0)
+ {
file_length = ftell(fp);
rewind (fp);
}
- if (file_length > 0) {
- buffer = (char *) calloc (file_length + 1, sizeof(char));
- if (fread (buffer, 1, file_length, fp) == file_length) {
+ if (file_length > 0)
+ {
+ buffer = (char *) calloc (file_length + 1, sizeof (char));
+ if (buffer && fread (buffer, 1, file_length, fp) == (size_t) file_length)
+ {
*length = file_length;
- } else {
+ }
+ else
+ {
free (buffer);
buffer = NULL;
}
commit 8089711a61687d565f207c56d3d2b658f514d7ab
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Sun Feb 18 23:25:15 2018 +0330
Another attempt on fixing coverity
I hope I am in a correct direction at least
diff --git a/.travis.yml b/.travis.yml
index 04f1cdcb..662fab59 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,8 +12,7 @@ env:
- CONFIGURE_OPTS="--with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2"
- NOCONFIGURE=1
# COVERITY_SCAN_TOKEN
- - secure: "MRJtVu/fQoWNwMAamvIJBCX/1SMvEuEUk/ljAif/y2/3syyWgxFGp17UGnDILdoZYyCqTM+jQciY2P0nVqbjjOAUlML4QOAalqw8kPp8iTsnHUe+KOMVrOVP6p6qAQxk1im1O41cCMkmVKvk+NXe/on5euz6LGF2laHZaOAMoes="
- - PROJECT_NAME="behdad/harfbuzz" # the project name on coverity
+ - secure: "Vw1UUHsAr4t3xuvOqqBsFAORptmNcQRrcGJnzSX7jDODBIRNfnU2LIBTagrPNKfSUhyQgCHqt1gX9iWNWvVfy3sDOXr2MXZeoqmF6Y1mS35J0rA/EPJgRHsdkxygkmFnXVeQkEuI55BINkaSoOpAeunmXKJNw1p9JVw368Fm/tU="
matrix:
include:
@@ -80,7 +79,7 @@ addons:
coverity_scan:
project:
- name: harfbuzz/harfbuzz
+ name: HarfBuzz
version: 1.0
description: HarfBuzz OpenType text shaping engine
notification_email: harfbuzz-bots-chatter at googlegroups.com
More information about the HarfBuzz
mailing list