Commits (3)
...@@ -493,10 +493,9 @@ local_draw_rect(struct rectlist *rect) ...@@ -493,10 +493,9 @@ local_draw_rect(struct rectlist *rect)
// Scale... // Scale...
source = do_scale(rect, x_cvstat.scaling, x_cvstat.scaling, x_cvstat.aspect_width, x_cvstat.aspect_height); source = do_scale(rect, x_cvstat.scaling, x_cvstat.scaling, x_cvstat.aspect_width, x_cvstat.aspect_height);
if (source == NULL) { bitmap_drv_free_rect(rect);
bitmap_drv_free_rect(rect); if (source == NULL)
return; return;
}
cleft = source->w; cleft = source->w;
ctop = source->h; ctop = source->h;
......
...@@ -12491,35 +12491,35 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs) ...@@ -12491,35 +12491,35 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
break; break;
case 1: case 1:
if (access(cache_path, R_OK)) if (access(cache_path, R_OK))
conn_send("0\r", 2, 1000); conn_send("0\r\n", 2, 1000);
else else
conn_send("1\r", 2, 1000); conn_send("1\r\n", 2, 1000);
break; break;
case 2: case 2:
if (stat(cache_path, &st)) if (stat(cache_path, &st))
conn_send("0\r", 2, 1000); conn_send("0\r\n", 2, 1000);
else { else {
sprintf(str, "1.%" PRIdOFF "\n", st.st_size); sprintf(str, "1.%" PRIdOFF "\r\n", st.st_size);
conn_send(str, strlen(str), 1000); conn_send(str, strlen(str), 1000);
} }
break; break;
case 3: case 3:
if (stat(cache_path, &st)) if (stat(cache_path, &st))
conn_send("0\r", 2, 1000); conn_send("0\r\n", 2, 1000);
else { else {
localtime_r(&st.st_atime, &tm); localtime_r(&st.st_atime, &tm);
strftime(dstr, sizeof(dstr), "%m/%d/&y.%H:%M:%S", &tm); strftime(dstr, sizeof(dstr), "%m/%d/&y.%H:%M:%S", &tm);
sprintf(str, "1.%" PRIdOFF ".%s\n", st.st_size, dstr); sprintf(str, "1.%" PRIdOFF ".%s\r\n", st.st_size, dstr);
conn_send(str, strlen(str), 1000); conn_send(str, strlen(str), 1000);
} }
break; break;
case 4: case 4:
if (stat(cache_path, &st)) if (stat(cache_path, &st))
conn_send("0\r", 2, 1000); conn_send("0\r\n", 2, 1000);
else { else {
localtime_r(&st.st_atime, &tm); localtime_r(&st.st_atime, &tm);
strftime(dstr, sizeof(dstr), "%m/%d/&y.%H:%M:%S", &tm); strftime(dstr, sizeof(dstr), "%m/%d/&y.%H:%M:%S", &tm);
sprintf(str, "1.%s.%" PRIdOFF ".%s\n", &args[6], st.st_size, dstr); sprintf(str, "1.%s.%" PRIdOFF ".%s\r\n", &args[6], st.st_size, dstr);
conn_send(str, strlen(str), 1000); conn_send(str, strlen(str), 1000);
} }
break; break;
...@@ -13292,7 +13292,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs) ...@@ -13292,7 +13292,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
break; break;
} }
size_t fnln = p - &args[8]; size_t fnln = p - &args[8];
if (cpln + fnln >= cpln) { if (cpln + fnln >= sizeof(cache_path)) {
strcpy(rip.bbs->dldir, dldir); strcpy(rip.bbs->dldir, dldir);
free(dldir); free(dldir);
break; break;
...@@ -13336,7 +13336,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs) ...@@ -13336,7 +13336,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
break; break;
} }
size_t fnln = p - &args[8]; size_t fnln = p - &args[8];
if (cpln + fnln >= cpln) { if (cpln + fnln >= sizeof(cache_path)) {
strcpy(rip.bbs->uldir, uldir); strcpy(rip.bbs->uldir, uldir);
free(uldir); free(uldir);
break; break;
......