Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion libs/libsacd/sacd_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ static sacd_input_t sacd_net_input_open(const char *target)
pb_istream_t input;
pb_ostream_t output;
uint8_t zero = 0;
char host[256];

strncpy(host, target, strchr(target, ':') - target);
host[strchr(target, ':') - target] = '\0';

/* Allocate the library structure */
dev = (sacd_input_t) calloc(sizeof(*dev), 1);
Expand All @@ -354,7 +358,7 @@ static sacd_input_t sacd_net_input_open(const char *target)

timeout_markstart(&tm);
err = inet_tryconnect(&dev->fd,
substr(target, 0, strchr(target, ':') - target),
host,
atoi(strchr(target, ':') + 1), &tm);
if (err)
{
Expand Down
2 changes: 1 addition & 1 deletion tools/sacd_extract/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static struct opts_s
scarletbook_handle_t *handle;
scarletbook_output_t *output;

void mkdir_wrap(char *name, char *mode){
void mkdir_wrap(char *name, int mode){
#ifdef __MINGW32__
wchar_t *wname;
wname = (wchar_t *) charset_convert(name, strlen(name), "UTF-8", "UCS-2-INTERNAL");
Expand Down