- test commit.
--> malloc with 532 chars is working --> malloc with more than 533 chars causes an error
This commit is contained in:
parent
4b258871be
commit
102a887add
1 changed files with 4 additions and 3 deletions
|
@ -22,13 +22,14 @@ void help() {
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
char* command = malloc(1024*sizeof(char));
|
||||
char* command = malloc(533*sizeof(char));
|
||||
|
||||
int size, status = 0;
|
||||
pid_t pid;
|
||||
system("clear");
|
||||
showlogo();
|
||||
while(1) {
|
||||
printf("$ ");
|
||||
/* printf("$ ");
|
||||
size = scanf("%s", command);
|
||||
if(!strcmp(command, "exit")) {
|
||||
return 0;
|
||||
|
@ -47,7 +48,7 @@ int main(int argc, char** argv)
|
|||
wait(&status);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/}
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue