From cb443900ba9aa12c691441c23e0f858c3c3e694f Mon Sep 17 00:00:00 2001 From: Christiaan Welvaart Date: Fri, 15 Jul 2011 09:13:12 +0000 Subject: - g-ir-extract-deps: when deps offset is zero, bail out to prevent bogus typelib(GOBJ) dependencies --- NEWS | 3 +++ configure.ac | 2 +- g-ir-extract-deps.c | 16 ++++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index c33fc89..dfb2cd8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +Version 1.139 -15 July 2011, by Christiaan Welvaart +- gi interdependencies: deps offset 0 means no dependencies + Version 1.138 - 7 July 2011, by Christiaan Welvaart - gi deps for python: accept arbitrary whitespace in dependency lists diff --git a/configure.ac b/configure.ac index 2929570..a45dd5b 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # $Id: configure.ac 271266 2010-11-04 10:43:28Z fwang $ AC_PREREQ(2.59) -AC_INIT(rpm-mageia-setup, 1.138, boklm@mars-attacks.org) +AC_INIT(rpm-mageia-setup, 1.139, boklm@mars-attacks.org) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(1.9 -Wno-portability) AC_CONFIG_SRCDIR diff --git a/g-ir-extract-deps.c b/g-ir-extract-deps.c index 1c1735d..f0cf725 100644 --- a/g-ir-extract-deps.c +++ b/g-ir-extract-deps.c @@ -52,17 +52,21 @@ int main(int argc, char ** argv) fprintf(stderr, "failed to read deps offset from typelib\n"); exit(1); } - fseek(typelib, deps_offset, SEEK_SET); - if (fscanf(typelib, "%8191s", deps) < 1) + if (deps_offset > 0) { - fprintf(stderr, "failed to read deps from typelib\n"); - exit(1); - } + fseek(typelib, deps_offset, SEEK_SET); + if (fscanf(typelib, "%8191s", deps) < 1) + { + fprintf(stderr, "failed to read deps from typelib\n"); + exit(1); + } + printf("%s\n", deps); + } + free(deps); free(magic); fclose(typelib); - printf("%s\n", deps); return 0; } -- cgit v1.2.1