[IRC-DEV] Fw: [Coder-Com] BUG in m_stats.c in 2.10.11

Jorge Duarte jduarter at navegalia.com
Wed Oct 9 16:41:03 CEST 2002


> Hi all,
>
> I've found a bug in m_stats.c.. it puts the stats character the user asked
> for into a signed char value, which is bad news if it's a char with
> value > 127...
>
> (yes, some luser just cored our test server again)
>
> I'm assuming this trivial fix will nail it (but haven't tested of course).
>
> --- m_stats.c~  2002-07-30 00:09:02.000000000 +0100
> +++ m_stats.c   2002-10-09 00:12:31.000000000 +0100
> @@ -117,7 +117,7 @@
>  int
>  m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
>  {
> -  char stat = parc > 1 ? parv[1][0] : '\0';
> +  unsigned char stat = parc > 1 ? parv[1][0] : '\0';
>    struct StatDesc *sd;
>    char *param = 0;

Sacado de la lista de programación de ircu (coder-com de undernet)

--
Jorge Duarte
mount <jduarter at navegalia.com>





More information about the IRC-Dev mailing list