evas - generic loaders - fix possible string overflow on decoders

Summary:
fix possible string overflow on decoders.
         this commit is based on commit 3c5412f728
         that fixes CID 1039580.

Reviewers: raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1783
This commit is contained in:
Jaehyun Cho 2014-12-17 17:48:51 +09:00 committed by Carsten Haitzler (Rasterman)
parent 98b32bcea5
commit c8a993d1f7
1 changed files with 2 additions and 1 deletions

View File

@ -173,7 +173,8 @@ _load(Eina_File *ef, const char *key,
// single extn not too long
if (((end - dot1) <= 5) && (!illegal_char(dot1)))
{
strcpy(&(decoders[decoders_num][0]), img_loader);
strncpy(&(decoders[decoders_num][0]), img_loader, 127);
decoders[decoders_num][127] = 0;
dotcat(&(decoders[decoders_num][0]), dot1);
decoders_num++;
}