Use memdup for binary data, not strdup