Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 49739 Details for
Bug 79845
games-action/abuse_sdl CAN-2005-0098+CAN-2005-0099
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
/home/jaervosz/patch.CAN-2005-0098.abuse
patch.CAN-2005-0098.abuse (text/plain), 2.61 KB, created by
Sune Kloppenborg Jeppesen (RETIRED)
on 2005-01-28 07:14:35 UTC
(
hide
)
Description:
/home/jaervosz/patch.CAN-2005-0098.abuse
Filename:
MIME Type:
Creator:
Sune Kloppenborg Jeppesen (RETIRED)
Created:
2005-01-28 07:14:35 UTC
Size:
2.61 KB
patch
obsolete
>--- abuse-2.00/abuse/src/dev.c Thu Oct 10 17:11:29 1996 >+++ abuse-2.00.new/abuse/src/dev.c Wed Jan 26 10:00:21 2005 >@@ -878,7 +878,8 @@ > } else if (!strcmp(argv[i],"-f")) > { > i++; >- strcpy(level_file,argv[i]); >+ strncpy(level_file,argv[i],sizeof(level_file)-1); >+ level_file[sizeof(level_file)] = '\0'; > } else if (!strcmp(argv[i],"-2")) > start_doubled=1; > else if (!strcmp(argv[i],"-demo")) >--- abuse-2.00/abuse/src/innet.c Fri Apr 12 01:12:29 1996 >+++ abuse-2.00.new/abuse/src/innet.c Wed Jan 26 10:00:21 2005 >@@ -74,7 +74,8 @@ > } else if (!strcmp(argv[i],"-net") && i<argc-1) > { > i++; >- strcpy(main_net_cfg->server_name,argv[i]); >+ strncpy(main_net_cfg->server_name,argv[i],sizeof(main_net_cfg->server_name)-1); >+ main_net_cfg->server_name[sizeof(main_net_cfg->server_name)]='\0'; > main_net_cfg->state=net_configuration::CLIENT; > } > else if (!strcmp(argv[i],"-ndb")) >--- abuse-2.00/abuse/src/loader2.c Mon Apr 15 21:10:19 1996 >+++ abuse-2.00.new/abuse/src/loader2.c Wed Jan 26 10:00:21 2005 >@@ -83,7 +83,7 @@ > if (fp->open_failure()) > { > delete fp; >- sprintf(fn,"art/%s",filename); >+ snprintf(fn,sizeof(fn),"art/%s",filename); > fp=open_file(fn,"rb"); > if (fp->open_failure()) > { >@@ -303,12 +303,13 @@ > if (!strcmp(argv[i],"-lsf")) > { > i++; >- strcpy(lsf,argv[i]); >+ strncpy(lsf,argv[i],sizeof(lsf)-1); >+ lsf[sizeof(lsf)]='\0'; > } > if (!strcmp(argv[i],"-a")) > { > i++; >- sprintf(lsf,"addon/%s/%s.lsp",argv[i],argv[i]); >+ snprintf(lsf,sizeof(lsf),"addon/%s/%s.lsp",argv[i],argv[i]); > } > } > } else if (!get_remote_lsf(net_server,lsf)) >--- abuse-2.00/abuse/src/net/unix/engine.c Sun Oct 15 10:18:47 1995 >+++ abuse-2.00.new/abuse/src/net/unix/engine.c Wed Jan 26 10:00:21 2005 >@@ -269,7 +269,9 @@ > else if (!strcmp(argv[i],"-game_port")) > game_port=atoi(argv[i+1]); > else if (!strcmp(argv[i],"-net")) >- { strcpy(net_server,argv[i+1]); } >+ { strncpy(net_server,argv[i+1],sizeof(net_server)); >+ net_server[sizeof(net_server)]='\0'; >+ } > > if (game_port==-1) game_port=DEFAULT_GAME_PORT+1; > >--- abuse-2.00/abuse/src/old_server.c Fri Apr 12 01:12:54 1996 >+++ abuse-2.00.new/abuse/src/old_server.c Wed Jan 26 10:00:21 2005 >@@ -81,7 +81,8 @@ > } else if (!strcmp(argv[i],"-name")) // name player uses when connecting > { > i++; >- strcpy(name,argv[i]); >+ strncpy(name,argv[i],sizeof(name)-1); >+ name[sizeof(name)]='\0'; > } else if (!strcmp(argv[i],"-nonet")) > { > dprintf("Network bypassed, no player will be able to connect\n");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 79845
: 49739 |
49740