title: Valgrind Use of unitialized value of size 8
body: <p>I recently ran a full leak check with valgrind only to discover this error and "Conditional jump or move depends on uninitialised value(s)" it has been throwing. What am i doing wrong here? It keeps pointing to this function: </p>
  
  <pre><code>int tldlist_add(TLDList *tld, char *hostname, Date *d) {
  
      if (date_compare(tld-&gt;begin, d) &gt; 0 || date_compare(tld-&gt;end, d) &lt; 0)
          return 0;
  
      char *dot = strrchr(hostname, '.') + 1;
      int i = 0;
      while (i &lt; sizeof(dot))
      {
          dot[i] = tolower(dot[i]);
          i++;
      }
      char *temptld = (char *)malloc(sizeof(dot));
      strcpy(temptld, dot);
  
      tld-&gt;root = addnode(tld, temptld, tld-&gt;root);
      tld-&gt;count++;
      return 1;
  
  }
  </code></pre>
  
  <p>specifically at this line: <code>dot[i] = tolower(dot[i]);</code></p>
  
  <p>Any help would be greatly appreciated, thank you!</p>