OpenCV (Open Source Computer Vision, Wikipedie), tj. open source multiplatformní knihovna pro zpracování obrazu a počítačové vidění, byla vydána v nové major verzi 5.
Byla vydána nová verze 9.7 multiplatformní digitální pracovní stanice pro práci s audiem (DAW) Ardour. Přehled novinek, vylepšení a oprav v poznámkách k vydání.
Vývojáři webového prohlížeče Ladybird dnes oznámili, že mění způsob vývoje. S blížícím se vydáním alfa verze přestávají přijímat veřejné pull requesty. Všechny otevřené veřejné pull requesty budou uzavřeny. Tým nedokáže garantovat bezpečnost AI generovaných pull requestů.
OpenLogi (GitHub) je open source náhrada aplikace Logi Options+ pro přizpůsobení myší od společnosti Logitech. Zatím běží pouze na macOS.
Na čem pracují vývojáři webového prohlížeče Ladybird (GitHub)? Byl publikován přehled vývoje za květen (YouTube).
Úřad pro ochranu osobních údajů řeší desítky stížností na jednotné měsíční hlášení zaměstnavatele, které stát spustil počátkem dubna. Systém, jenž má firmám odlehčit od desítek formulářů, nejenže výrazně zatížil jejich účetní oddělení, ale docházelo v něm i k únikům osobních dat zaměstnanců k firmám, kde nepracovali. Podle ministerstva práce a sociálních věcí stála za problémem technická chyba. „Incident se týkal několika stovek
… více »Byla vydána (𝕏, Bluesky) nová verze 22.0.0 open source webového aplikačního frameworku Angular (Wikipedie). Přehled novinek v příspěvku na blogu.
Vim Classic byl vydán ve verzi 8.3. Drew DeVault oznámil tento fork editoru Vim (verze 8.2.0148, tj. těsně před zavedením Vim9 skriptování) v březnu letošního roku. Důvodem forku bylo, že vývojáři editorů Vim a Neovim začali při vývoji využívat LLM.
Open source konference DevConf.CZ 2026 proběhne 18. a 19. června v Brně na FIT VUT. Publikován byl program a spuštěna byla registrace.
Společnost JetBrains uvolnila verzi 2 svého open-source velkého jazykového modelu (LLM) pro vývojáře Mellum.
marian@marian-lubuntu:~/lincardemu-0.21a$ make
OSTARGET='UNIX' uname='Linux' date: 20181105
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o main.o main.c
main.c: In function ‘main’:
main.c:773:8: warning: variable ‘fname’ set but not used [-Wunused-but-set-variable]
char *fname;
^
main.c:887:18: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(prompt, curr_CS->system,28);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/errno.h:28,
from debug.h:27,
from common.h:22,
from main.c:20:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
main.c:913:5: warning: format not a string literal and no format arguments [-Wformat-security]
scrprint(msg);
^
main.c:928:5: warning: format not a string literal and no format arguments [-Wformat-security]
scrprint(msg);
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o command.o command.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o config.o config.c
config.c: In function ‘ConfigSection’:
config.c:148:22: warning: pointer targets in passing argument 1 of ‘StrNoCaseCmp’ differ in signedness [-Wpointer-sign]
if(!StrNoCaseCmp(LcsConfig[i].system, section)) {
^
In file included from config.c:29:0:
confutil.h:67:5: note: expected ‘const char *’ but argument is of type ‘byte *’
int StrNoCaseCmp(const char *s1, const char *s2);
^
config.c: In function ‘ConfigVarVal’:
config.c:208:22: warning: pointer targets in passing argument 2 of ‘SetU’ differ in signedness [-Wpointer-sign]
if (!SetU(val, &auto_check, 4, 0, 0, 0x7fffffff)) auto_check=0;
^
In file included from config.c:29:0:
confutil.h:55:5: note: expected ‘unsigned int *’ but argument is of type ‘int *’
int SetU (char *val,unsigned *var, unsigned sz, int base,
^
config.c:211:22: warning: pointer targets in passing argument 2 of ‘SetU’ differ in signedness [-Wpointer-sign]
if (!SetU(val, &auto_save, 4, 0, 0, 0x7fffffff)) auto_save=0;
^
In file included from config.c:29:0:
confutil.h:55:5: note: expected ‘unsigned int *’ but argument is of type ‘int *’
int SetU (char *val,unsigned *var, unsigned sz, int base,
^
config.c: In function ‘build_ATR’:
config.c:410:8: warning: variable ‘TS’ set but not used [-Wunused-but-set-variable]
byte TS,T0,FI=1,DI=1,II=0,PI1=0,PI2=0, N=0;
^
config.c:408:9: warning: variable ‘pTA1’ set but not used [-Wunused-but-set-variable]
byte *pTA1=NULL;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o std_log.o std_log.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o emu_options.o emu_options.c
ar r lce.a command.o config.o std_log.o emu_options.o
ar: creating lce.a
ranlib lce.a
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o des.o des.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o ec.o ec.c
ec.c: In function ‘log_current_status’:
ec.c:84:15: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(bf,chan->name);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from ec.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:102:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
^
ec.c: In function ‘DoEC’:
ec.c:447:30: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
if (cur_chan) strncpy(msg,cur_chan->labelname,16);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from ec.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
ec.c:448:39: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
else if (real_ec.chan) strncpy(msg,real_ec.chan->labelname,16);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from ec.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
ec.c:461:20: warning: pointer targets in passing argument 2 of ‘sendbyte_n’ differ in signedness [-Wpointer-sign]
sendbyte_n(dbg, msg, n);
^
In file included from common.h:63:0,
from ec.h:4,
from ec.c:9:
serfunc.h:39:5: note: expected ‘byte *’ but argument is of type ‘char *’
int sendbyte_n(int deb,byte *ch, int n) ;
^
ec.c:1129:8: warning: variable ‘key’ set but not used [-Wunused-but-set-variable]
byte key;
^
ec.c:1261:23: warning: variable ‘cp’ set but not used [-Wunused-but-set-variable]
char txt[60], *cp;
^
ec.c:1408:23: warning: variable ‘cp’ set but not used [-Wunused-but-set-variable]
char txt[60], *cp;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o conax.o conax.c
conax.c: In function ‘ChangeConaxSubsystem’:
conax.c:173:32: error: lvalue required as left operand of assignment
if (v>=0) (int)caselected=in[0];
^
conax.c: In function ‘ParseECM’:
conax.c:702:10: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(name, buf+i+1, nanolen-1);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
conax.c:702:16: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(name, buf+i+1, nanolen-1);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
conax.c:740:14: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
if(strlen(strb) > 0)
^
In file included from conax.c:6:0:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘byte *’
extern size_t strlen (const char *__s)
^
conax.c: In function ‘build_OSD_txt’:
conax.c:855:11: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(OSD_txt+6, txt, l);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
conax.c: In function ‘DoConax’:
conax.c:1322:43: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
for(i=0; i<64; i++) sprintf(decoded+i*3, "%02X ", demm[i]);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/stdio2.h:31:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
^
conax.c:1497:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name = tempChannel->name;
^
conax.c:1565:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name=cur_chan->name;
^
conax.c:1695:15: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name=currch->name;
^
conax.c:1781:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name=nagraChannel->name;
^
conax.c:1883:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name = subc->name;
^
conax.c:1885:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name = conaxChannel->name;
^
conax.c:1969:14: warning: pointer targets in passing argument 1 of ‘SetUL’ differ in signedness [-Wpointer-sign]
if (SetUL(B2_ins+3,&pin,sz-1,10))
^
In file included from conax.c:9:0:
confutil.h:54:5: note: expected ‘char *’ but argument is of type ‘byte *’
int SetUL(char *val,unsigned long *var, unsigned sz, int base);
^
conax.c:1974:8: warning: format not a string literal and no format arguments [-Wformat-security]
scrprint(msg);
^
conax.c:908:12: warning: variable ‘dbgsend’ set but not used [-Wunused-but-set-variable]
int dbg, dbgsend;
^
conax.c:903:7: warning: variable ‘tempp3’ set but not used [-Wunused-but-set-variable]
int tempp3 = 0;
^
xxxx: recipe for target 'conax.o' failed
make: *** [conax.o] Error 1
zdrojaky sú http://www.streamboard.tv/oscam/ticket/369
conax.c:173:32: error: lvalue required as left operand of assignment
if (v>=0) (int)caselected=in[0];
Autor se snaží přiřadit integer číslo do proměnné typu ukazatel. Zkus v tom kódu dát před "caselected" hvězdičku. Nevím ale zda to je to co měl autor na mysli, že chce udělat.
Ostatní chyby jsou takové ty klasické "kašlu na to, funguje to", kdy se používají signed typy v unsigned použití apod.
Jsi si jistý, že neexistuje nějakej modernější soft na komunikaci? Jestli to je z roku 2003, tak to dost možná nemusí být 64bit kompatibilní.
Vzhledem k tomu, jak se ta proměnná používá, měl autor spíš na mysli
if (v >= 0)
*(int *)&caselected = in[0]
Ale vzhledem k tomu, že proměnná je static a všude se před použitím castuje na int, nevidím důvod, proč je deklarovaná jako pointer. Ono i kdyby se v různých větvích používaly různé typy, tak od toho je union, který existoval už dlouho před rokem 2003.
if (v>=0) *(int *)&caselected = in[0];ma byt
if (v>=0) caselected = in[0];Podla: https://www.comhit.net/archive/index.php?t-32910.html
int a ze které se vždy čte int, má být prostě int, ne pointer.
if (v >= 0)
*(int *)&caselected = in[0]
potom
marian@marian-lubuntu:~/lincardemu-0.21a$ make
OSTARGET='UNIX' uname='Linux' date: 20181105
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o main.o main.c
main.c: In function ‘main’:
main.c:773:8: warning: variable ‘fname’ set but not used [-Wunused-but-set-variable]
char *fname;
^
main.c:887:18: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(prompt, curr_CS->system,28);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/errno.h:28,
from debug.h:27,
from common.h:22,
from main.c:20:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
main.c:913:5: warning: format not a string literal and no format arguments [-Wformat-security]
scrprint(msg);
^
main.c:928:5: warning: format not a string literal and no format arguments [-Wformat-security]
scrprint(msg);
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o command.o command.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o config.o config.c
config.c: In function ‘ConfigSection’:
config.c:148:22: warning: pointer targets in passing argument 1 of ‘StrNoCaseCmp’ differ in signedness [-Wpointer-sign]
if(!StrNoCaseCmp(LcsConfig[i].system, section)) {
^
In file included from config.c:29:0:
confutil.h:67:5: note: expected ‘const char *’ but argument is of type ‘byte *’
int StrNoCaseCmp(const char *s1, const char *s2);
^
config.c: In function ‘ConfigVarVal’:
config.c:208:22: warning: pointer targets in passing argument 2 of ‘SetU’ differ in signedness [-Wpointer-sign]
if (!SetU(val, &auto_check, 4, 0, 0, 0x7fffffff)) auto_check=0;
^
In file included from config.c:29:0:
confutil.h:55:5: note: expected ‘unsigned int *’ but argument is of type ‘int *’
int SetU (char *val,unsigned *var, unsigned sz, int base,
^
config.c:211:22: warning: pointer targets in passing argument 2 of ‘SetU’ differ in signedness [-Wpointer-sign]
if (!SetU(val, &auto_save, 4, 0, 0, 0x7fffffff)) auto_save=0;
^
In file included from config.c:29:0:
confutil.h:55:5: note: expected ‘unsigned int *’ but argument is of type ‘int *’
int SetU (char *val,unsigned *var, unsigned sz, int base,
^
config.c: In function ‘build_ATR’:
config.c:410:8: warning: variable ‘TS’ set but not used [-Wunused-but-set-variable]
byte TS,T0,FI=1,DI=1,II=0,PI1=0,PI2=0, N=0;
^
config.c:408:9: warning: variable ‘pTA1’ set but not used [-Wunused-but-set-variable]
byte *pTA1=NULL;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o std_log.o std_log.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o emu_options.o emu_options.c
ar r lce.a command.o config.o std_log.o emu_options.o
ar: creating lce.a
ranlib lce.a
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o des.o des.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o ec.o ec.c
ec.c: In function ‘log_current_status’:
ec.c:84:15: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(bf,chan->name);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from ec.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:102:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
^
ec.c: In function ‘DoEC’:
ec.c:447:30: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
if (cur_chan) strncpy(msg,cur_chan->labelname,16);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from ec.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
ec.c:448:39: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
else if (real_ec.chan) strncpy(msg,real_ec.chan->labelname,16);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from ec.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
ec.c:461:20: warning: pointer targets in passing argument 2 of ‘sendbyte_n’ differ in signedness [-Wpointer-sign]
sendbyte_n(dbg, msg, n);
^
In file included from common.h:63:0,
from ec.h:4,
from ec.c:9:
serfunc.h:39:5: note: expected ‘byte *’ but argument is of type ‘char *’
int sendbyte_n(int deb,byte *ch, int n) ;
^
ec.c:1129:8: warning: variable ‘key’ set but not used [-Wunused-but-set-variable]
byte key;
^
ec.c:1261:23: warning: variable ‘cp’ set but not used [-Wunused-but-set-variable]
char txt[60], *cp;
^
ec.c:1408:23: warning: variable ‘cp’ set but not used [-Wunused-but-set-variable]
char txt[60], *cp;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o conax.o conax.c
conax.c: In function ‘ParseECM’:
conax.c:702:10: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(name, buf+i+1, nanolen-1);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
conax.c:702:16: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(name, buf+i+1, nanolen-1);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
conax.c:740:14: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
if(strlen(strb) > 0)
^
In file included from conax.c:6:0:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘byte *’
extern size_t strlen (const char *__s)
^
conax.c: In function ‘build_OSD_txt’:
conax.c:855:11: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(OSD_txt+6, txt, l);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
conax.c: In function ‘DoConax’:
conax.c:1322:43: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
for(i=0; i<64; i++) sprintf(decoded+i*3, "%02X ", demm[i]);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from conax.c:4:
/usr/include/i386-linux-gnu/bits/stdio2.h:31:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
^
conax.c:1497:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name = tempChannel->name;
^
conax.c:1565:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name=cur_chan->name;
^
conax.c:1695:15: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name=currch->name;
^
conax.c:1781:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name=nagraChannel->name;
^
conax.c:1883:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name = subc->name;
^
conax.c:1885:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
curr_name = conaxChannel->name;
^
conax.c:1969:14: warning: pointer targets in passing argument 1 of ‘SetUL’ differ in signedness [-Wpointer-sign]
if (SetUL(B2_ins+3,&pin,sz-1,10))
^
In file included from conax.c:9:0:
confutil.h:54:5: note: expected ‘char *’ but argument is of type ‘byte *’
int SetUL(char *val,unsigned long *var, unsigned sz, int base);
^
conax.c:1974:8: warning: format not a string literal and no format arguments [-Wformat-security]
scrprint(msg);
^
conax.c:908:12: warning: variable ‘dbgsend’ set but not used [-Wunused-but-set-variable]
int dbg, dbgsend;
^
conax.c:903:7: warning: variable ‘tempp3’ set but not used [-Wunused-but-set-variable]
int tempp3 = 0;
^
conax.c: In function ‘ChangeConaxSubsystem’:
conax.c:176:22: warning: iteration 6u invokes undefined behavior [-Waggressive-loop-optimizations]
if (systab[i].sys1) {
^
conax.c:175:7: note: containing loop
for(i=0; i<...) {
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o irdeto.o irdeto.c
irdeto.c: In function ‘DoIrdeto’:
irdeto.c:296:17: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
byte *demm = buf+14+8+1;
^
irdeto.c:299:31: warning: pointer targets in passing argument 1 of ‘Nagra_RSADecrypt_SSL_EMM’ differ in signedness [-Wpointer-sign]
Nagra_RSADecrypt_SSL_EMM(buf+14, (int)buf[12],nagraChannel->b[E11], nagraChannel->b[N11],nagraChannel->b[N12]);
^
In file included from irdeto.c:20:0:
nagra.h:11:13: note: expected ‘unsigned char *’ but argument is of type ‘char *’
extern void Nagra_RSADecrypt_SSL_EMM(unsigned char* Data, int provid, BIGNUM *e1, BIGNUM *n1, BIGNUM *n2);
^
irdeto.c:302:31: warning: pointer targets in passing argument 1 of ‘Nagra_RSADecrypt_SSL_EMM’ differ in signedness [-Wpointer-sign]
Nagra_RSADecrypt_SSL_EMM(buf+14, (int)buf[12],nagraChannel->b[E11], nagraChannel->b[N11],nagraChannel->b[N22]);
^
In file included from irdeto.c:20:0:
nagra.h:11:13: note: expected ‘unsigned char *’ but argument is of type ‘char *’
extern void Nagra_RSADecrypt_SSL_EMM(unsigned char* Data, int provid, BIGNUM *e1, BIGNUM *n1, BIGNUM *n2);
^
irdeto.c:306:33: warning: pointer targets in passing argument 1 of ‘Nagra_RSADecrypt_SSL_EMM’ differ in signedness [-Wpointer-sign]
Nagra_RSADecrypt_SSL_EMM(buf+14, (int)buf[12],nagraChannel->b[E31], nagraChannel->b[N31],nagraChannel->b[N32]);
^
In file included from irdeto.c:20:0:
nagra.h:11:13: note: expected ‘unsigned char *’ but argument is of type ‘char *’
extern void Nagra_RSADecrypt_SSL_EMM(unsigned char* Data, int provid, BIGNUM *e1, BIGNUM *n1, BIGNUM *n2);
^
irdeto.c:314:35: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
for (i=0; i<64; i++) sprintf(decoded+i*3, "%02X ", demm[i]);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from irdeto.c:3:
/usr/include/i386-linux-gnu/bits/stdio2.h:31:1: note: expected ‘char * __restrict__’ but argument is of type ‘byte *’
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
^
irdeto.c:438:13: warning: variable ‘nw’ set but not used [-Wunused-but-set-variable]
int nw;
^
irdeto.c:211:25: warning: variable ‘camkey_inuse’ set but not used [-Wunused-but-set-variable]
int i=0,counter=0,x=0,camkey_inuse=0;
^
irdeto.c:207:12: warning: variable ‘dbgsend’ set but not used [-Wunused-but-set-variable]
int dbg, dbgsend;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o irdeto_v1_algorithm.o irdeto_v1_algorithm.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o seca.o seca.c
seca.c: In function ‘DoSeca’:
seca.c:608:12: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
tbuf = buf;
^
seca.c:618:29: warning: pointer targets in passing argument 2 of ‘mlogprint_buffer’ differ in signedness [-Wpointer-sign]
mlogprint_buffer(dbg, buf, 0, counter, "\n\nIndata :");
^
In file included from common.h:22:0,
from config.h:23,
from seca.c:5:
debug.h:213:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’
void mlogprint_buffer(int dbg, unsigned char *buf, int first, int sz,
^
seca.c:622:38: warning: pointer targets in passing argument 3 of ‘Seca2decryptEMM’ differ in signedness [-Wpointer-sign]
int res = Seca2decryptEMM(chan, p2, buf, p3);
^
In file included from seca.c:10:0:
seca2Algorithm.h:9:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’
int Seca2decryptEMM(struct Secachannel *ch, unsigned char key_in_use, unsigned char *emm, int len);
^
seca.c:634:16: warning: pointer targets in passing argument 3 of ‘SecaDecrypt’ differ in signedness [-Wpointer-sign]
buf+counter-8);
^
In file included from seca.h:5:0,
from seca.c:8:
secaAlgorithm.h:7:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’
void SecaDecrypt(unsigned char *k1, unsigned char *k2, unsigned char *d);
^
seca.c: In function ‘log_current_SECA_status’:
seca.c:761:11: warning: variable ‘name’ set but not used [-Wunused-but-set-variable]
char *name;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o viaccess.o viaccess.c
viaccess.c: In function ‘log_current_status_Viaccess’:
viaccess.c:95:15: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(bf,chan->name);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/string.h:25,
from viaccess.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:102:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
^
viaccess.c: In function ‘DoViaccess’:
viaccess.c:281:20: warning: pointer targets in passing argument 2 of ‘sendbyte_n’ differ in signedness [-Wpointer-sign]
sendbyte_n(dbg, provider, p3-6);
^
In file included from common.h:63:0,
from config.h:23,
from viaccess.c:9:
serfunc.h:39:5: note: expected ‘byte *’ but argument is of type ‘char *’
int sendbyte_n(int deb,byte *ch, int n) ;
^
viaccess.c:354:20: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
if (cur_chan) cp=cur_chan->labelname ;
^
viaccess.c:517:20: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(msg+n,cur_chan->labelname,lsz-n);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/string.h:25,
from viaccess.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘u8 *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
viaccess.c:528:22: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(txt+1,curr_CS->system,4);
^
In file included from /usr/include/features.h:374:0,
from /usr/include/string.h:25,
from viaccess.c:3:
/usr/include/i386-linux-gnu/bits/string3.h:117:1: note: expected ‘const char * __restrict__’ but argument is of type ‘byte *’
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
^
viaccess.c:541:20: warning: pointer targets in passing argument 2 of ‘sendbyte_n’ differ in signedness [-Wpointer-sign]
sendbyte_n(dbg, msg, n);
^
In file included from common.h:63:0,
from config.h:23,
from viaccess.c:9:
serfunc.h:39:5: note: expected ‘byte *’ but argument is of type ‘char *’
int sendbyte_n(int deb,byte *ch, int n) ;
^
viaccess.c:1449:19: warning: variable ‘cp’ set but not used [-Wunused-but-set-variable]
char txt[60], *cp;
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o tpscrypt.o tpscrypt.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o secaAlgorithm.o secaAlgorithm.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o videoguard.o videoguard.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o ec-s.o ec-s.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o nagra.o nagra.c
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o seca2Algorithm.o seca2Algorithm.c
seca2Algorithm.c: In function ‘Seca2decrypt’:
seca2Algorithm.c:1253:26: warning: variable ‘nanoD2Data’ set but not used [-Wunused-but-set-variable]
const unsigned char *nanoD2Data=0;
^
seca2Algorithm.c: In function ‘Seca2decryptEMM’:
seca2Algorithm.c:1419:10: warning: variable ‘Mask’ set but not used [-Wunused-but-set-variable]
void (*Mask)(unsigned short offset, unsigned char *buffer);
^
seca2Algorithm.c: At top level:
seca2Algorithm.c:281:22: warning: ‘tabFx1_pol’ defined but not used [-Wunused-variable]
static unsigned char tabFx1_pol[256] = {
^
seca2Algorithm.c:298:22: warning: ‘tabFx2_pol’ defined but not used [-Wunused-variable]
static unsigned char tabFx2_pol[256] = {
^
gcc -Wall -O2 -g -DUNIX -DUSE_PRIORITY_SCHEDULING -DVERS=\"0.21a\" -c -o sha.o sha.c
make: *** No rule to make target '6805_cpu.h', needed by 'NagraFxEmu.o'. Stop.
touch 6805_cpu.hPodla: https://www.comhit.net/threads/32910-Funkar-lincardemu
void ir_CAMencrypt(unsigned char *a, byte *camkey)
{
char i, j;
unsigned char t;
unsigned char xor;
byte keytemp[8];
memcpy((byte *)keytemp, (byte *)camkey, 8);
for (i = 7; i >= 0; --i)
{
for (j = 7; j >= 0; --j)
{
xor = a[6];
xor ^= keytemp[(unsigned char)j];
xor ^= i;
xor = ir_table1[xor];
t = a[7];
a[7] = a[6];
a[6] = a[5] ^ xor;
a[5] = a[4];
a[4] = a[3];
a[3] = a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = t ^ xor;
}
ir_rotrk(keytemp);
}
}
myslím, že to mrzne na tých cykloch...
/* edited debian+ ir_CAMencrypt from lincardemu (GPLv2) */
#include "stdio.h"
#define byte char
void ir_CAMencrypt(unsigned char *a, byte *camkey)
{
char i, j;
unsigned char t;
unsigned char xor;
byte keytemp[8];
//memcpy((byte *)keytemp, (byte *)camkey, 8);
for (i = 7; i >= 0; --i)
{
for (j = 7; j >= 0; --j)
{
/*xor = a[6];
xor ^= keytemp[(unsigned char)j];
xor ^= i;
xor = ir_table1[xor];
t = a[7];
a[7] = a[6];
a[6] = a[5] ^ xor;
a[5] = a[4];
a[4] = a[3];
a[3] = a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = t ^ xor;*/
}
//ir_rotrk(keytemp);
}
}
int main(int argc, char **argv)
{
ir_CAMencrypt(0, NULL);
return 0;
}
Ale ked pozeram na riadok:
xor ^= i;tam mohlo pripadne zmenit vypocet kontrolneho suctu a potom nieco nesedelo, ked poslalo, tak to zostalo stat/vysiet. char ma definovanu velkost 1B, ostatne maju iba urceny minimalny rozsah.
Fakčí mi to zatial len v usb čítačke ovládanej oscamom, čo je len také testovacie prostr. Cieľom je rozbehať to v hw CAM_e, povedzme aj certifikovanom.
Nateraz to vidím tak, že bude potrebné sa pohrať s resetom a ATR_kom, tak ako to má vyriešené Fausto(windows apl., ktorá disponuje aj touto funkciou), kde po štarte sa čaká na reset(privedené napätie na určitý pin season interface), inak povedané zasunutie karty do CAM(čítačka). Lincardemu posiela ATR po štarte, aj keď je tam aj funkcia manual_reset...Proste ešte bude treba na tom čo porobiť.Mohlo by to záležet na tom, jak překladač implementuje typ char. Pokud jako unsigned, bude podmínka "i > 0" automaticky splněná a novější překladače rovnou přeloží cyklus jako nekonečný.
Tohle je právě jeden z příkladů, kdy vyzkoušet nestačí, protože chování závisí na překladači. Moje doporučení je:
char používat jen tam, kde se jedná čistě o znak a neprovádím žádné aritmetické operace.un)signed char.u)int8_t.Ako inak by sa dalo tomu pomôcť? Napadá ma zakomponovanie backround funkcie priamo do programu, ale sám s tým nehnem.
Backround funkciou som myslel upraviť zdrojak tak, aby sa program spúšťal na pozadí.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#ifndef COUNT_OUT_FILE
#define COUNT_OUT_FILE 100
#endif
void create_file(char *path)
{
FILE *file=NULL;
if(path == NULL)
return;
file=fopen(path, "w");
if(file == NULL)
return;
fclose(file);
}
int main(int argc, char **argv)
{
int i;
char path[200];
if(daemon(1, 1) == -1)
{
fputs("Error run program as deamon().\n", stderr);
return 1;
}
/* pocka 3 sekundy */
sleep(3);
/* vytvori COUNT_OUT_FILE praznych suborov v /tmp */
for(i=1;i<=COUNT_OUT_FILE;i++)
{
snprintf(path, 200, "/tmp/files_%02d", i);
create_file(path);
}
return 0;
}
Cez prikaz si mozes overit, ze ma prava vlastnika:
ps aux|grep tmp_deamon
Vyzerá to skôr na nejaký bug v lincardemu.
ldd PATH_TO_SCREEN_BINARY
git clone https://git.savannah.gnu.org/git/screen.git
git clone https://git.savannah.gnu.org/git/screen.git cd git cd src ./autogen.sh ./configure make # spustenie ./screen # instalacia do systemu (ako root) ... instaluje do /usr/local/bin atd. # make installMake instal
$ git clone https://github.com/crigler/dtach $ cd dtach $ ./configure $ make CC="powerpc-linux-gnu-gcc -static" $ du -h dtach 724K dtach # sputenie program v dtach # dtach -A PATH_SOCKET COMMAND # priklad spustenia htop (odkusane) ./dtach -A /tmp/session1 htop
./dtach -a /tmp/session1
Kompilujem to s ppcold toolchainom, pretože s repoz. gcc mi hocijaka kompilácia(lincardemu,hello_word,dtach..), aj keď prebehne ok, spustená aplikácia vyhodí segmentation fault.
A k tomu dtach_u, po chvíľke to spadne:root@dm500 /var/bin # dtach -A /tmp/session1 lincardemu -r
Got CA ID 0609 from 127.0.0.1 - port 11113
Got CA ID 0624 from 127.0.0.1 - port 11112
*** ATR(16): 3b f7 11 00 01 40 96 54 30 04 0e 6c b6 d6 90 00
*** Warning : ATR(Seca) size mismatch, size=14, should be=14 ***
Build/check ATR(Irdeto) :
ts:3b t0:9f ta1:21 td1:0e hist.(15): 49 52 44 45 54 4f 20 41 43 53 20 56 36 2e 30
*** ATR(20): 3b 9f 21 0e 49 52 44 45 54 4f 20 41 43 53 20 56 36 2e 30 9e
fi=2 di=1 ii=0 pi1=0 pi2=0, guardtime N=0
External clk., max fs= 6.000MHz, F=558, D=1.00, max I=25mA, Vpp=0V
Work @ 6.000MHz 3.571MHz 4.000MHz
etu 93000▒s 156250▒s 139500▒s
bps 10753, 6400 7168 [bits per second]
ATR(Irdeto): direct, BPS=9600, parity=odd
*** ATR(9): 3b 24 00 30 42 30 30 90 00
*** Warning : ATR(Eurocrypt-S) size mismatch, size=7, should be=7 ***
lincardemu 0.21a 'Eurocrypt, Viaccess, Seca, Irdeto, Conax, VGuard alpha'..
(C) 2000-2004 The Linux Card Emulator Team
This program is free software; under the GNU General Public License (GPL)
Read Copyright.txt or http://www.fsf.org for more information on GPL.
System:Irdeto Protocol: 9600 8,None,1,Direct COM1,/dev/tts/0
Waiting for reset
ATR sent successfully
!! Signal 0x1 received
saving & shutting down
[EOF - dtach terminating]
Najskôr som "vypol" v main.c...void sighandler_general(int sv). A nakoniec sa ukázalo, že stačilo vypnúť EXTRAT. (čo ani neviem načo je, možno na automatické save/check files).
Tiskni
Sdílej: