rpms/xwota/devel xwota-0.4-empty-fields.patch, NONE, 1.1 xwota.spec, 1.4, 1.5
Lucian Langa
lucilanga at fedoraproject.org
Thu Jan 14 18:46:04 UTC 2010
Author: lucilanga
Update of /cvs/pkgs/rpms/xwota/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27393
Modified Files:
xwota.spec
Added Files:
xwota-0.4-empty-fields.patch
Log Message:
* Thu Jan 14 2010 Lucian Langa <cooly at gnome.eu.org> - 0.4-9
- fix for bug (#555286)
xwota-0.4-empty-fields.patch:
station_info_callback.c | 22 +++++++++++++++++-----
stuff.c | 9 +++++----
2 files changed, 22 insertions(+), 9 deletions(-)
--- NEW FILE xwota-0.4-empty-fields.patch ---
diff -Naur xwota-0.4/src/station_info_callback.c xwota-0.4-mod/src/station_info_callback.c
--- xwota-0.4/src/station_info_callback.c 2006-07-15 16:33:40.000000000 +0300
+++ xwota-0.4-mod/src/station_info_callback.c 2010-01-14 20:10:52.000000000 +0200
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#include <string.h>
#include <gtk/gtk.h>
#include "station_info_callback.h"
@@ -54,11 +55,22 @@
latitude_ = gtk_entry_get_text(GTK_ENTRY(latitude));
longitude_ = gtk_entry_get_text(GTK_ENTRY(longitude));
- call_ = uppercase(call_);
- state_ = uppercase(state_);
- grid_ = uppercase(grid_);
-
-
+ if (strlen(call_))
+ call_ = uppercase(call_);
+ else
+ call_ = "NOCALL";
+
+ if (strlen(state_))
+ state_ = uppercase(state_);
+ else
+ state_ = "";
+
+ if (strlen(grid_))
+ grid_ = uppercase(grid_);
+ else
+ grid_ = "";
+
+
//printf("Call: %s\n%s\n%s\n%s\n%s\n%s\n%s\n",call,country,state,grid,county,latitude, longitude);
xwota_settings.call = g_strdup(call_);
diff -Naur xwota-0.4/src/stuff.c xwota-0.4-mod/src/stuff.c
--- xwota-0.4/src/stuff.c 2006-07-28 19:00:10.000000000 +0300
+++ xwota-0.4-mod/src/stuff.c 2010-01-14 20:03:18.000000000 +0200
@@ -274,14 +274,15 @@
// UPPERCASE
gchar *uppercase(gchar *upper) {
-
-int upper_len,i;
+ int upper_len,i;
upper_len=strlen(upper);
+
+ g_return_val_if_fail(upper_len || !upper, NULL);
+
for(i=0;i<upper_len+1;i++) {
upper[i] = toupper(upper[i]);
}
-return upper;
-
+ return upper;
}
// Main statusbar
Index: xwota.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xwota/devel/xwota.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- xwota.spec 3 Aug 2009 18:23:31 -0000 1.4
+++ xwota.spec 14 Jan 2010 18:46:04 -0000 1.5
@@ -1,6 +1,6 @@
Name: xwota
Version: 0.4
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Who's On the Air Database interface
Group: Applications/Communications
@@ -9,31 +9,33 @@ URL: http://people.fabaris.it
Source0: http://people.fabaris.it/iz0ete/%{name}/%{name}-%{version}.tar.gz
Source1: xwota.desktop
Source2: xwota.png
-Patch0: xwota-0.4-overflow.patch
+Patch0: xwota-0.4-overflow.patch
+Patch1: xwota-0.4-empty-fields.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig
BuildRequires: gtk2-devel
BuildRequires: desktop-file-utils
-#Requires:
+#Requires:
%description
-Xwota is intended for amateur radio operators who want to make use of the WOTA
+Xwota is intended for amateur radio operators who want to make use of the WOTA
database.
-It can be used to find out who is on the air, the band and frequency they are
-operating on, and their location by country, state, county, grid, and
+It can be used to find out who is on the air, the band and frequency they are
+operating on, and their location by country, state, county, grid, and
latitude/longitude
-It's very similar to a DX Cluster client, but it works with the WOTA database
+It's very similar to a DX Cluster client, but it works with the WOTA database
and contains more informations.
-If you don't known what is the WOTA database, please read some infos at
+If you don't known what is the WOTA database, please read some infos at
http://www.wotadb.org.
%prep
%setup -q
%patch0 -p1 -b .overflow
+%patch1 -p1 -b .empty-fields
%build
@@ -66,6 +68,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Jan 14 2010 Lucian Langa <cooly at gnome.eu.org> - 0.4-9
+- fix for bug (#555286)
+
* Mon Aug 03 2009 Lucian Langa <cooly at gnome.eu.org> - 0.4-8
- fix buffer overflow (#510918)
More information about the scm-commits
mailing list