title: is used uninitialized in this function
body: <p>I am having a really difficult time with this function.</p>
  
  <pre><code>void GetBaseDeclarationLabel(char *strings_label_table1[], char *strings_mneumonic_table1[],
           char *strings_operand_table1[], int hex_address_table1[], char *base_label)
  {
      int i = 0;
      int cmp_str2 = 0;
      //char label[20] = {0}; 
      //int k = 0; 
      //printf(" i is %s \n", strings_label_table1[1]); 
      for(i = 0; i &lt; 503; i++)
      {
          if(strings_mneumonic_table1[i] != NULL)
          {
              cmp_str2 = strcmp(strings_mneumonic_table1[i], "BASE");
              if(cmp_str2 == 0)
              {
                  //printf(" ??please?? \n");
                  //printf(" hex_address_table1[i] is %x \n", hex_address_table1[i]);
                  //strcpy(label, strings_operand_table1[i]);
                  base_label = malloc(strlen(strings_operand_table1[i])+1);
                  strcpy(base_label, strings_operand_table1[i]);
                  //base_label = strings_operand_table1[i]; 
                  break;
              }
          }
  
      }
      //return label;
  } 
  </code></pre>
  
  <p>This is my initial variable declaration. The reason why I made it NULL is because my warning flags complained it was uninitialized and I had a segmentation fault when I didn't do that. Now that I have done that I can't get my <code>base_label</code> to change. I have tried the usual = method, and just for the hell of it I tried the malloc and then strcpy method. Neither method worked in changing the value. </p>
  
  <pre><code>char *base_label = NULL;  
  </code></pre>
  
  <p>This is how I call the function. </p>
  
  <pre><code>GetBaseDeclarationLabel(strings_label_table1, strings_mneumonic_table1,
       strings_operand_table1, hex_address_table1, base_label);
  </code></pre>