Reg seg. violations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I  am mainly getting segmentation violation at this code in strlen and strcpy:

printf("Content-type: text/html\n\n");
line_buffer = (char *) malloc(strlen(getenv("QUERY_STRING")) + 1);
strcpy(line_buffer, getenv("QUERY_STRING"));

at strlen and strcpy when QUERY_STRING is not set .
Is there a way to handle this? there are a lot of such occurrences.

Regards,
Vivek

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux