[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Segfejl under kørsel, menikke når jeg debugger!



On Wed, 23 Jun 2004 20:24:45 +0200
Anders Melchiorsen <sslug@sslug> wrote:

> Søren Egmose <sslug@sslug> skrev:
> 
> > Hvis vi nu skal være pedantiske:
> >
> >    char type[sizeof(int) * 25] = ""; 
> >
> > initialisere type ellers vil strcat potentielt lave bufferoverrun,
> > hvis type ikke er nulstillet, det er vist ikke portable at den er
> > det.
> 
> Der blev da slet ikke brugt strcat i eksemplet?
> 

Der bliver brugt strcpy, men de 2 funktioner ligner jo også hinanden
temmeligt meget.

	if (strcmp(extension, "html") == 0)
		strcpy(type, "text/html");

Bo


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *