Subversion Repositories Kolibri OS

Rev

Rev 536 | Rev 593 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 536 Rev 566
Line 1... Line 1...
1
$Revision: 536 $
1
$Revision: 566 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                              ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
Line 517... Line 517...
517
           test eax, 2
517
           test eax, 2
518
           jz .fail            ;àäðåñ íå çàðåçåðâèðîâàí äëÿ ;
518
           jz .fail            ;àäðåñ íå çàðåçåðâèðîâàí äëÿ ;
519
                               ;èñïîëüçîâàíèÿ. Îøèáêà
519
                               ;èñïîëüçîâàíèÿ. Îøèáêà
520
.alloc:
520
.alloc:
521
           call alloc_page
521
           call alloc_page
522
           and eax, eax
522
           test eax, eax
523
           jz .fail
523
           jz .fail
Line 524... Line 524...
524
 
524
 
Line 525... Line 525...
525
           stdcall map_page,[ebp-4],eax,dword PG_UW
525
           stdcall map_page,[ebp-4],eax,dword PG_UW
Line 561... Line 561...
561
 
561
 
562
; io permission map
562
; io permission map
Line 563... Line 563...
563
; copy-on-write protection
563
; copy-on-write protection
564
 
564
 
565
           call alloc_page
565
           call alloc_page
Line 566... Line 566...
566
           and eax, eax
566
           test eax, eax
567
           jz .fail
567
           jz .fail
568
 
568
 
Line 785... Line 785...
785
           mov  edi,[eax+SLOT_BASE+0xa0]  ;is ipc area defined?
785
           mov  edi,[eax+SLOT_BASE+0xa0]  ;is ipc area defined?
786
           test edi,edi
786
           test edi,edi
787
           jz   .no_ipc_area
787
           jz   .no_ipc_area
Line 788... Line 788...
788
 
788
 
789
           mov ebx, edi
-
 
790
       ;    add edi, new_app_base
789
           mov ebx, edi
791
           and ebx, 0xFFF
790
           and ebx, 0xFFF
Line 792... Line 791...
792
           mov [dst_offset], ebx
791
           mov [dst_offset], ebx
793
 
792
 
Line 810... Line 809...
810
           mov edi, [dst_offset]
809
           mov edi, [dst_offset]
811
           add edi, [used_buf]
810
           add edi, [used_buf]
812
           cmp dword [edi], 0
811
           cmp dword [edi], 0
813
           jnz  .ipc_blocked          ;if dword [buffer]<>0 - ipc blocked now
812
           jnz  .ipc_blocked          ;if dword [buffer]<>0 - ipc blocked now
Line 814... Line 813...
814
 
813
 
815
           mov ebx, dword [edi+4]
814
           mov edx, dword [edi+4]
816
           mov edx, ebx
-
 
817
           add ebx, 8
815
           lea ebx, [edx+8]
818
           add ebx, [msg_size]
816
           add ebx, [msg_size]
819
           cmp ebx, [buf_size]
817
           cmp ebx, [buf_size]
Line 820... Line 818...
820
           ja .buffer_overflow         ;esi<0 - not enough memory in buffer
818
           ja .buffer_overflow         ;esi<0 - not enough memory in buffer