summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/main.c9
-rw-r--r--version.log6
3 files changed, 12 insertions, 4 deletions
diff --git a/Changes b/Changes
index 59343ed30..45a3e7326 100644
--- a/Changes
+++ b/Changes
@@ -49,6 +49,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006
07/20 F Removed bold chars from botserv langauge files. [#530]
07/20 F Fixed win32 versions of db-merger.c and epona2anope.c. [#536]
07/20 F db-merger.c and epona2anope.c will now properly delete old dbs. [ #00]
+08/02 F Fixed very nasty typecast. GCC Hardened should now work. [#557]
Provided by ThaPrince <jon@vile.com> - 2006
05/19 A Plexus 3 support. [ #00]
diff --git a/src/main.c b/src/main.c
index a5d18059b..6359cedec 100644
--- a/src/main.c
+++ b/src/main.c
@@ -557,6 +557,7 @@ int main(int ac, char **av, char **envp)
while (!quitting) {
time_t t = time(NULL);
+ char *sgetbuf = NULL;
if (debug >= 2)
alog("debug: Top of main loop");
@@ -598,11 +599,13 @@ int main(int ac, char **av, char **envp)
}
waiting = 1;
- i = (int) (long) sgets2(inbuf, sizeof(inbuf), servsock);
+ /* fixing this nasty, nasty typecast. why should we typecast
+ a char pointer to a long int? -Certus */
+ sgetbuf = sgets2(inbuf, sizeof(inbuf), servsock);
waiting = 0;
- if (i > 0) {
+ if (sgetbuf) {
process();
- } else if (i == 0) {
+ } else {
int errno_save = errno;
quitmsg = scalloc(BUFSIZE, 1);
if (quitmsg) {
diff --git a/version.log b/version.log
index 03bbc892d..3dcfa4208 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="14"
VERSION_EXTRA=""
-VERSION_BUILD="1102"
+VERSION_BUILD="1103"
# $Log$
#
+# BUILD : 1.7.14 (1103)
+# BUGS : 557
+# NOTES : Fixed very nasty typecast. GCC Hardened should now work.
+#
# BUILD : 1.7.14 (1102)
# BUGS : 560
# NOTES : fixed ptlink /newmask stuff. thx to trystan.