Bug 1426853 - GeoIP_database_info is not returning full string from database
Summary: GeoIP_database_info is not returning full string from database
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: GeoIP
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Paul Howarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-25 18:24 UTC by Peter Bieringer
Modified: 2017-04-07 18:19 UTC (History)
2 users (show)

Fixed In Version: GeoIP-1.6.10-1.fc24 GeoIP-1.6.10-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-07 16:48:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Bieringer 2017-02-25 18:24:00 UTC
Description of problem:
GeoIP_database_info is not returning full string from database

Version-Release number of selected component (if applicable):
GeoIP-1.6.9-2.fc24.x86_64 (from FC25 repo)


How reproducible:
always


Steps to Reproduce:
1. create C code and call+print GeoIP_database_info


Actual results:
$ md5sum GeoIP.dat 
2d2203d8938c35f4ea65e03ec15ad1f5  GeoIP.dat
$ ./a.out 
GeoIP_database_info=GEO-106FREE 20160607 Build 1 Copy


Expected results (CentOS 7 with GeoIP-1.5.0-11.el7.x86_64)

$ md5sum GeoIP.dat 
2d2203d8938c35f4ea65e03ec15ad1f5  GeoIP.dat
$ ./a.out 
GeoIP_database_info=GEO-106FREE 20160607 Build 1 Copyright (c) 2016 MaxMind 


Additional info:

C-Code:

#include "GeoIP.h"
#include "GeoIPCity.h"
#include <stdio.h>

int main() {
	GeoIP *gi = NULL;
	char *filename = "./GeoIP.dat";

	gi = GeoIP_open(filename, GEOIP_STANDARD);

	printf("GeoIP_database_info=%s\n", GeoIP_database_info(gi));

	GeoIP_delete(gi);
}


compiled with 

gcc -l GeoIP test_geoip.c


strings of /usr/share/GeoIP/GeoIP.dat shows full string

Comment 1 Fedora Update System 2017-02-26 13:51:55 UTC
GeoIP-1.6.9-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f8a9655a1c

Comment 2 Fedora Update System 2017-02-26 13:52:03 UTC
GeoIP-1.6.9-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d8033000d4

Comment 3 Peter Bieringer 2017-02-26 17:00:20 UTC
Only fixing GeoIP.dat, but there are still issues on others:

GeoIP-1.6.9-4.fc25.x86_64

sligthly extended test program:

#include "GeoIP.h"
#include "GeoIPCity.h"
#include <stdio.h>

int main() {
	GeoIP *gi = NULL;
	char *filename;

	filename = "./GeoIP.dat";
	gi = GeoIP_open(filename, GEOIP_STANDARD);
	printf("file=%s GeoIP_database_info=>%s<\n", filename, GeoIP_database_info(gi));
	GeoIP_delete(gi);

	filename = "./GeoIPv6.dat";
	gi = GeoIP_open(filename, GEOIP_STANDARD);
	printf("file=%s GeoIP_database_info=>%s<\n", filename, GeoIP_database_info(gi));
	GeoIP_delete(gi);
}


file=./GeoIP.dat GeoIP_database_info=>GEO-106FREE 20160607 Build 1 Copyright (c) 2016 MaxMind <
file=./GeoIPv6.dat GeoIP_database_info=>GEO-106FREE 20161004 Build 1 Copy<


GeoIP.dat info has now a trailing space...

=> https://github.com/maxmind/geoip-api-c/pull/80 was not a generic fix of the problem...

Comment 4 Paul Howarth 2017-02-26 17:46:18 UTC
Best bet would be to raise this on the upstream tracker on GitHub and talk to the developers themselves rather than going through me. That'll get it fixed quicker.

Comment 5 Peter Bieringer 2017-02-26 19:00:05 UTC
Issue filed https://github.com/maxmind/geoip-api-c/issues/85 and also it turned out that it is caused by newer database files...let's wait for upstream comments on this very strange problem.

Comment 6 Fedora Update System 2017-02-26 23:17:52 UTC
GeoIP-1.6.9-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d8033000d4

Comment 7 Fedora Update System 2017-03-23 15:44:57 UTC
GeoIP-1.6.9-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f8a9655a1c

Comment 8 Fedora Update System 2017-03-23 15:46:09 UTC
GeoIP-1.6.9-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d8033000d4

Comment 9 Fedora Update System 2017-03-24 19:52:12 UTC
GeoIP-1.6.9-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d8033000d4

Comment 10 Fedora Update System 2017-03-24 20:23:01 UTC
GeoIP-1.6.9-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f8a9655a1c

Comment 11 Fedora Update System 2017-03-30 14:10:03 UTC
GeoIP-1.6.10-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f8a9655a1c

Comment 12 Fedora Update System 2017-03-30 14:19:50 UTC
GeoIP-1.6.10-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d8033000d4

Comment 13 Fedora Update System 2017-03-31 03:19:12 UTC
GeoIP-1.6.10-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d8033000d4

Comment 14 Fedora Update System 2017-03-31 03:21:19 UTC
GeoIP-1.6.10-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f8a9655a1c

Comment 15 Fedora Update System 2017-04-07 16:48:21 UTC
GeoIP-1.6.10-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-04-07 18:19:13 UTC
GeoIP-1.6.10-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.