diff options
author | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-08-03 12:06:36 +0000 |
---|---|---|
committer | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-08-03 12:06:36 +0000 |
commit | f978c93b2c1aa778c49e306a275cf053530d7704 (patch) | |
tree | a30cee15cead6c652efc5ca409f0fa047b526f74 | |
parent | 7824683cb2780920ec1dceeaedd1c0bb851be04c (diff) |
# BUILD : 1.7.14 (1106) # BUGS : # NOTES : applied heinz's fix for the gcc hardened issue
git-svn-id: svn://svn.anope.org/anope/trunk@1106 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@830 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/main.c | 11 | ||||
-rw-r--r-- | src/sockutil.c | 2 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c index 6359cedec..aee7a0520 100644 --- a/src/main.c +++ b/src/main.c @@ -557,7 +557,6 @@ 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"); @@ -599,13 +598,13 @@ int main(int ac, char **av, char **envp) } waiting = 1; - /* fixing this nasty, nasty typecast. why should we typecast - a char pointer to a long int? -Certus */ - sgetbuf = sgets2(inbuf, sizeof(inbuf), servsock); + /* this is a nasty nasty typecast. we need to rewrite the + socket stuff -Certus */ + i = (int) (long) sgets2(inbuf, sizeof(inbuf), servsock); waiting = 0; - if (sgetbuf) { + if ((i>0) || (i<(-1))) { process(); - } else { + } else if (i == 0) { int errno_save = errno; quitmsg = scalloc(BUFSIZE, 1); if (quitmsg) { diff --git a/src/sockutil.c b/src/sockutil.c index 049f181d3..2308dd528 100644 --- a/src/sockutil.c +++ b/src/sockutil.c @@ -453,7 +453,7 @@ char *sgets2(char *buf, int len, ano_socket_t s) char *str = sgets(buf, len, s); if (!str || str == (char *) -1) - return NULL; + return str; str = buf + strlen(buf) - 1; if (*str == '\n') *str-- = 0; diff --git a/version.log b/version.log index ba278ea35..b68f56dbc 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="14" VERSION_EXTRA="" -VERSION_BUILD="1105" +VERSION_BUILD="1106" # $Log$ # +# BUILD : 1.7.14 (1106) +# BUGS : +# NOTES : applied heinz's fix for the gcc hardened issue +# # BUILD : 1.7.14 (1105) # BUGS : 558 # NOTES : fixed usermode stuff for ratbox and shadow |