From: "Yuri N. Sedunov" <aris@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] libytnef
Date: Thu, 15 Jul 2010 07:20:23 +0400
Message-ID: <1279164023.565.1.camel@arisbook> (raw)
In-Reply-To: <AANLkTilqtL2rMoEdQsqh_sN79NgqVVu9f71XxMW_tGm-@mail.gmail.com>
В Срд, 14/07/2010 в 09:07 +0400, Damir Shayhutdinov пишет:
> > Не подскажет ли уважаемое сообщество, как правильно поправить сей кусок
> > кода?
> >> 320 unsigned char *DecompressRTF(variableLength *p, int *size) {
> >> 1321 unsigned char *dst; // destination for uncompressed bytes
> >> 1322 unsigned char *src;
> >> 1323 unsigned int in;
> >> 1324 unsigned int out;
> >> 1325 int i;
> >> 1326 variableLength comp_Prebuf;
> >> 1327 ULONG compressedSize, uncompressedSize, magic, crc32;
> >> 1328
> >> 1329 comp_Prebuf.size = strlen(RTF_PREBUF);
> >> 1330 comp_Prebuf.data = calloc(comp_Prebuf.size, 1);
> >> 1331 strcpy(comp_Prebuf.data, RTF_PREBUF);
> Правильное решение зависит от сематики поля size.
>
> Если я правильно угадал, что это поле означает - тогда так
> 1329 comp_Prebuf.size = strlen(RTF_PREBUF) + 1;
Спасибо.
--
Yuri N. Sedunov
prev parent reply other threads:[~2010-07-15 3:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 4:46 Yuri N. Sedunov
2010-07-14 5:07 ` Damir Shayhutdinov
2010-07-15 3:20 ` Yuri N. Sedunov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279164023.565.1.camel@arisbook \
--to=aris@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git