Re: [vdr] eg...@lovete.ro

2011-06-15 Thread Füley István

Sorry for this, my mistake :(

On 2011.06.14. 21:54, Füley István wrote:

Szia,

ezt a laptopot tudnám ajánlani:

Asus X52JU-SX244D

- kijelző 15.6 ColorShine HD (1366x768) LCD
- processzor INTEL Core i3 350M (2.26 GHz, cache 3 MB, FSB MHz)
- memória 2+1 GB DDR3 (1066 MHz)
- HDD 500 GB 5400 rpm
- videókártya AMD Radeon HD 6370 (512 MB GDDR3)
- hálózat Gigabit, b/g/n
- DVD-író
- webcam 0.3 MP
- 2 év garancia

2160.- RON áfástól

köszi,

Füley István


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr



___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] cppcheck: VDR 1.7.18: [timers.c:53]: (error) snprintf size is out of bounds

2011-06-15 Thread Paul Menzel
Dear VDR folks,


Cppcheck 1.49 [1] reports the following error when run against VDR
1.7.18.

[timers.c:53]: (error) snprintf size is out of bounds

Looking at `timers.c` in `CTimer` `*file = 0` and afterward written to
if I am not mistaken.

[…]
cTimer::cTimer(bool Instant, bool Pause, cChannel *Channel)
{
  startTime = stopTime = 0;
  lastSetEvent = 0;
  recording = pending = inVpsMargin = false;
  flags = tfNone;
  if (Instant)
 SetFlags(tfActive | tfInstant);
  channel = Channel ? Channel : 
Channels.GetByNumber(cDevice::CurrentChannel());
  time_t t = time(NULL);
  struct tm tm_r;
  struct tm *now = localtime_r(t, tm_r);
  day = SetTime(t, 0);
  weekdays = 0;
  start = now-tm_hour * 100 + now-tm_min;
  stop = now-tm_hour * 60 + now-tm_min + Setup.InstantRecordTime;
  stop = (stop / 60) * 100 + (stop % 60);
  if (stop = 2400)
 stop -= 2400;
  priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
  lifetime = Pause ? Setup.PauseLifetime : Setup.DefaultLifetime;
  *file = 0;
  aux = NULL;
  event = NULL;
  if (Instant  channel)
 snprintf(file, sizeof(file), %s%s, Setup.MarkInstantRecord ? @ 
: , *Setup.NameInstantRecord ? Setup.NameInstantRecord : channel-Name());
[…]

Unfortunately I do not know C++ well enough to judge this error message.


Thanks,

Paul


[1] http://cppcheck.sourceforge.net/


signature.asc
Description: This is a digitally signed message part
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] cppcheck: VDR 1.7.18: [timers.c:53]: (error) snprintf size is out of bounds

2011-06-15 Thread Klaus Schmidinger

On 15.06.2011 15:30, Paul Menzel wrote:

Dear VDR folks,


Cppcheck 1.49 [1] reports the following error when run against VDR
1.7.18.

[timers.c:53]: (error) snprintf size is out of bounds

Looking at `timers.c` in `CTimer` `*file = 0` and afterward written to
if I am not mistaken.


This just sets the string to be empty, but...


 […]
 cTimer::cTimer(bool Instant, bool Pause, cChannel *Channel)
 {
   ...
   *file = 0;
   aux = NULL;
   event = NULL;
   if (Instant  channel)
  snprintf(file, sizeof(file), %s%s, Setup.MarkInstantRecord ? @ : 
, *Setup.NameInstantRecord ? Setup.NameInstantRecord : channel-Name());


...this should be

  sizeof(file) - 1

Thanks for the bug report.

Klaus


 […]

Unfortunately I do not know C++ well enough to judge this error message.


Thanks,

Paul


[1] http://cppcheck.sourceforge.net/


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] cppcheck: VDR 1.7.18: [recording.c:1130]: (error) Allocation with UpdateFileName, TouchFile doesn't release it.

2011-06-15 Thread Klaus Schmidinger

On 15.06.2011 15:21, Paul Menzel wrote:

Dear VDR folks,


using Cppcheck 1.49 [1] to check VDR 1.7.18 the above error is shown.
Unfortunately I do not know how to fix this.

The following methods are the following (from two files).

 void cRecordings::TouchUpdate(void)
 {
   bool needsUpdate = NeedsUpdate();
   TouchFile(UpdateFileName());
   if (!needsUpdate)
  lastUpdate = time(NULL); // make sure we don't tigger ourselves
 }

 const char *cRecordings::UpdateFileName(void)
 {
   if (!updateFileName)
  updateFileName = strdup(AddDirectory(VideoDirectory, .update));
   return updateFileName;
 }

 void TouchFile(const char *FileName)
 {
   if (utime(FileName, NULL) == -1  errno != ENOENT)
  LOG_ERROR_STR(FileName);
 }


Thanks,

Paul


[1] http://cppcheck.sourceforge.net/


The update file name is initialized exactly once and lives until
the end of the program. There is no need to delete it, the
memory will be released when the program ends.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] cppcheck: VDR 1.7.18: [timers.c:53]: (error) snprintf size is out of bounds

2011-06-15 Thread Udo Richter
Am 15.06.2011 18:34, schrieb Klaus Schmidinger:
 On 15.06.2011 15:30, Paul Menzel wrote:
if (Instant  channel)
   snprintf(file, sizeof(file), %s%s,
 Setup.MarkInstantRecord ? @ : , *Setup.NameInstantRecord ?
 Setup.NameInstantRecord : channel-Name());
 
 ...this should be
 
   sizeof(file) - 1

Actually, all versions of snprintf documentation I've just checked agree
that snprintf will write at most size-1 chars and a trailing 0 byte, so
it was ok before too. But for safety, on byte less doesn't hurt.

Or is there some broken implementation out there that may write beyond
str[size-1]?

(strncpy is more broken, thats why my typical usage is:
  strncpy(dest, src, sizeof(dest)-1);
  dest[sizeof(dest)-1] = 0;
)

Cheers,

Udo

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] cppcheck: VDR 1.7.18: [timers.c:53]: (error) snprintf size is out of bounds

2011-06-15 Thread Gerald Dachs
Am Wed, 15 Jun 2011 18:34:59 +0200
schrieb Klaus Schmidinger klaus.schmidin...@tvdr.de:

 ...this should be
 
sizeof(file) - 1
 
 Thanks for the bug report.

This is no bug. The size parameter includes the '\0' byte.

Gerald

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] cppcheck: VDR 1.7.18: [timers.c:53]: (error) snprintf size is out of bounds

2011-06-15 Thread Klaus Schmidinger

On 15.06.2011 19:37, Udo Richter wrote:

Am 15.06.2011 18:34, schrieb Klaus Schmidinger:

On 15.06.2011 15:30, Paul Menzel wrote:

if (Instant   channel)
   snprintf(file, sizeof(file), %s%s,
Setup.MarkInstantRecord ? @ : , *Setup.NameInstantRecord ?
Setup.NameInstantRecord : channel-Name());


...this should be

   sizeof(file) - 1


Actually, all versions of snprintf documentation I've just checked agree
that snprintf will write at most size-1 chars and a trailing 0 byte, so
it was ok before too. But for safety, on byte less doesn't hurt.


Gee, you're right!


Or is there some broken implementation out there that may write beyond
str[size-1]?


None that I know of.

Well, since the docs for snprintf are clear about this, let's
leave things as they are.

I wonder, though, why cppcheck thinks there's something wrong
here...

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How can I add custom information to the EPG?

2011-06-15 Thread Klaus Schmidinger

On 14.06.2011 04:25, John Klimek wrote:

My provider sends EEPG information containing information such as
Original Air Date and Episode ID.


Is this defined in any official DVB spec document?

Klaus


I think I can add the
neccessary DVB descriptors the code but where should I add this in the
epg.data file?

Does anybody have any information or advice on this?

My goal is to use the epgsearch plugin with this extra data to record
new episodes (ie. never before aired), etc.


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How can I add custom information to the EPG?

2011-06-15 Thread John Klimek
No, it's not part of the DVB specification.  The data is stored inside
private descriptor tags.

On Wed, Jun 15, 2011 at 5:52 PM, Klaus Schmidinger
klaus.schmidin...@tvdr.de wrote:
 On 14.06.2011 04:25, John Klimek wrote:

 My provider sends EEPG information containing information such as
 Original Air Date and Episode ID.

 Is this defined in any official DVB spec document?

 Klaus

 I think I can add the
 neccessary DVB descriptors the code but where should I add this in the
 epg.data file?

 Does anybody have any information or advice on this?

 My goal is to use the epgsearch plugin with this extra data to record
 new episodes (ie. never before aired), etc.

 ___
 vdr mailing list
 vdr@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr