Memory leaks and lint found from clang "scan_build" - libcdio.git - libcdio

index : libcdio.git
libcdio
summary refs log tree commit diff
path: root/lib/iso9660/rock.c
diff options
context:
space:
mode:
authorR. Bernstein <rocky@gnu.org>2017年12月29日 20:59:45 -0500
committerR. Bernstein <rocky@gnu.org>2017年12月29日 20:59:45 -0500
commit8980bdebcb68916d2b2aea91b9d76e83a1a3c574 (patch)
tree0170babc6260151ffd81b6855dc39532ec38552b /lib/iso9660/rock.c
parentb2a881e9ea77dbf9ee77a6d642fc56d75b3179cc (diff)
downloadlibcdio-8980bdebcb68916d2b2aea91b9d76e83a1a3c574.tar.gz
Memory leaks and lint found from clang "scan_build"
Diffstat (limited to 'lib/iso9660/rock.c')
-rw-r--r--lib/iso9660/rock.c 5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/iso9660/rock.c b/lib/iso9660/rock.c
index ab7be8b3..db15a2e0 100644
--- a/lib/iso9660/rock.c
+++ b/lib/iso9660/rock.c
@@ -422,8 +422,9 @@ parse_rock_ridge_stat_internal(iso9660_dir_t *p_iso9660_dir,
switch(p_sl->flags &~1){
case 0:
realloc_symlink(p_stat, p_sl->len);
- memcpy(&(p_stat->rr.psz_symlink[p_stat->rr.i_symlink]),
- p_sl->text, p_sl->len);
+ if (p_sl->text && p_sl->len)
+ memcpy(&(p_stat->rr.psz_symlink[p_stat->rr.i_symlink]),
+ p_sl->text, p_sl->len);
p_stat->rr.i_symlink += p_sl->len;
break;
case 4:
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月25日 16:02:29 +0000

AltStyle によって変換されたページ (->オリジナル) /