Page MenuHomePhabricator

edc_parser: set uninitialized value
AbandonedPublic

Authored by bowonryu on Jun 1 2016, 5:10 AM.

Details

Summary

fix static analyzer warning

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1994
Build 2059: arc lint + arc unit
bowonryu updated this revision to Diff 9201.Jun 1 2016, 5:10 AM
bowonryu retitled this revision from to edc_parser: set uninitialized value.
bowonryu updated this object.
bowonryu added reviewers: Hermet, Jaehyun_Cho.
bowonryu updated this revision to Diff 9203.Jun 1 2016, 6:17 PM

fix static analyzer warning

Jaehyun_Cho requested changes to this revision.Jun 1 2016, 7:51 PM
Jaehyun_Cho edited edge metadata.

Please check the comments.

src/lib/edc_parser.c
2188

I think this is not the best value assignment based on the context... please see the alloca() function below.

2195

I think end_pos = start_pos; is the better value assignment here.

2201

I think it would be better to check if end_pos is the same as start_pos, if so it should return EINA_FALSE; after free(utf8);
I guess the original source code(which is not your source code) has logic hole and memory leak... :(

This revision now requires changes to proceed.Jun 1 2016, 7:51 PM

@bowonryu are you going to post an updated patch based on the review?

bowonryu abandoned this revision.Dec 16 2018, 7:13 PM