[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: [CPROG] lagersegmentfejl coredumped ??



Her har jeg sat næsten hele programmet ind som melder coredumped, det
mærkelige er jo at når jeg ligger det som et cgi-script og kalder det via
hjemmesiden så kommer fejlen coredumped ikke ??

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
int i,j,taller;
char *jann;
char link1[]="<A href=", link2[]=">", link3[]="</A><BR>",
samletlink[500]="";

char link[50]="";

printf("Content-type: text/plain");

jann = getenv("QUERY_STRING");


for (i=0 ; i<1000 ; i++)

 {
 if (jann[i]=='1')
  {
  taller=0;
  for (i=i+2;jann[i]!='&';i++)
   {
   link[0+taller]=jann[i];
   taller++;
   }
  }
 if (jann[i]=='.')
  if (jann[i+1]=='.')
   if (jann[i+2]=='.')
    i=1000;
 }

printf("\n\n%s",link);

 //  ************ Samle linksne *******************
 strcat(samletlink, link1);
 strcat(samletlink, link);
 strcat(samletlink, link2);
 strcat(samletlink, link);
 strcat(samletlink, link3);

 printf("\n\n  %s ",samletlink);
}





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 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] *