not understand exactly.

i changed atoi to s_atoi in the following commit

so if source ptr is NULL, it coude get 0 instead.

afterall, i plan to rewrite the datastructure sometime .


2013/5/8 Mitch Davis <notifications@github.com>

> In src/webqq.c:
>
> > @@ -2693,10 +2698,10 @@ static void display_user_info(PurpleConnection* gc,LwqqBuddy* b,char *who)
> >      ADD_STRING("备注",b->markname);
> >      ADD_STRING("签名",b->long_nick);
> >      ADD_HEADER("个人信息");
> > -    ADD_STRING("性别",b->gender);
> > -    ADD_STRING("生肖",b->shengxiao);
> > -    ADD_STRING("星座",b->constel);
> > -    ADD_STRING("血型",b->blood);
> > +    ADD_STRING("性别", strcmp(b->gender, "male") ? "女" : "男");
> > +    ADD_STRING("生肖",sxarr[atoi(b->shengxiao)]);
>
> Array lookup without bounds checking, using data sent to us over the
> internet. Could this be exploited?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/xiehuc/pidgin-lwqq/pull/276/files#r4128569>
> .
>