title: Filling a char pointer in a struct
body: <p>I have defined a "car" struct with a model (char *model) and the year of the model (int year).  I have a function that will create a new car struct; however, it is seg faulting when copying the char pointers.  This is supposed to create a new node for a linked list.</p>
  
  <pre><code>Car *newCar(char *model, int year){
      Car *new = malloc(sizeof(Car));
      new-&gt;year = year;
      new-&gt;model = malloc(MAX_LENGTH*sizeof(char));
      strcpy(new-&gt;model, model);
      new-&gt;next = NULL;
      return new;
  }
  </code></pre>